stefanhaustein / TerminalImageViewer

Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters
Other
1.56k stars 111 forks source link

File format is not recognized for 'test.jpg' #96

Closed breaklien closed 3 years ago

breaklien commented 3 years ago

Tested on Ubuntu 18.04:

$ tiv test.jpg -0

[CImg] *** CImgIOException *** [instance(0,0,0,0,(nil),non-shared)] CImg<unsigned char>::load(): Failed to open file 'test.jpg'.
File format is not recognized for 'test.jpg'

Test Image: https://pbs.twimg.com/media/EtXBnqTU0AAhyAC?format=jpg&name=large

aaronliu0130 commented 3 years ago

Tested on Ubuntu 18.04:

$ tiv test.jpg -0

[CImg] *** CImgIOException *** [instance(0,0,0,0,(nil),non-shared)] CImg<unsigned char>::load(): Failed to open file 'test.jpg'.
File format is not recognized for 'test.jpg'

Test Image: https://pbs.twimg.com/media/EtXBnqTU0AAhyAC?format=jpg&name=large

@breaklien That's a jfif image you've got there, not a jpg, which confuses CImg to use the wrong thing to read the file. Try renaming it to test.jfif and try again.

PS: PLEASE USE A SFW IMAGE NEXT TIME, OR AT LEAST PUT A WARNING! sorry for lashing out

aaronliu0130 commented 3 years ago

@breaklien follow up plz

stefanhaustein commented 3 years ago

The test image seems to be gone, so we can't repro, and aaron's investigation seems to indicate that the file extension didn't match the format