File format is not recognized for 'test.jpg'
breaklien opened this issue · 3 comments
breaklien commented
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
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
@breaklien follow up plz
stefanhaustein commented
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