Tom94 / tev

High dynamic range (HDR) image viewer for graphics people
BSD 3-Clause "New" or "Revised" License
1.08k stars 86 forks source link

tev unable to display a very simple png #73

Closed mmp closed 5 years ago

mmp commented 5 years ago

(Not a big problem, but I thought I'd report it anyway.)

tev silently fails at displaying this image: kdwarp-0, which is a single-channel PNG with a single white scanline and is otherwise black.

Interestingly enough, It has no problem with this one, which is the same resolution, also single channel, and has a few more white scanlines: kdwarp-2

Tom94 commented 5 years ago

This one was quite interesting, thanks!

Turns out, your failing PNG file is so small (just 102 bytes) that the file type check (which is done prior to actual loading to determine which load-library to use) reaches EOF. tev didn't clear the EOF flag when seeking back to the beginning of the file, which led to load failure.

PS: In case you're on Windows, you can make such failures a little less silent by opening the console via F12. :)