I'm generating an error when I try to run an animation in beamer. I have a set of 100 png files titled 0.png, 1.png, etc. Calling with this code,


I generate the error

libpng error: Not a PNG file

I've tried renaming all my files with extensions .png and .PNG, both give the same error. What's the issue here?

Edit: .log file here

Edit: 0.png here

closed as off-topic by user36296, Mico, Phelype Oleinik, Troy, user121799 Mar 15 '18 at 20:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – user36296, Mico, Phelype Oleinik, Troy, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Interesting. Never tested with files having a zero basename but just numbers. – AlexG Mar 15 '18 at 16:54
  • 1
    I just tested and with pdflatex from texlive2017 it works fine for me. – user36296 Mar 15 '18 at 17:05
  • 1
    Well, I tried a small set of files 0.png, 1.png, 2.png, 3.png residing in a subfolder and had no problems either. Phew!! – AlexG Mar 15 '18 at 17:05
  • 1
    @avikarto one step back to make sure your images are OK. Does \includegraphics{./figs/animBending/0} and \includegraphics{./figs/animBending/0.png} work? – user36296 Mar 15 '18 at 17:18
  • 1
    @samcarter Good call. This also generates the error. It must be that my files are screwed up, as AlexG suggested. – avikarto Mar 15 '18 at 17:20

The images in question were apparently gif files even though windows recognized them as .png. This was the source of the errors.

  • 1
    Therefore: Never suppress showing the file endings in WindosExplorer. There must be a switch somewhere to configure this. – AlexG Mar 15 '18 at 17:26
  • @AlexG I have windows set to show extensions, and the extensions are .png. The tool I used to convert the images must have simply renamed files .gif->.png instead of converting for real. – avikarto Mar 15 '18 at 17:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.