oozcitak / exiflibrary

A .Net Standard library for editing Exif metadata
MIT License
131 stars 48 forks source link

Image that won't load in exiflibrary #79

Closed devedse closed 4 years ago

devedse commented 4 years ago

Hi oozcitak, It's been a while but I just encountered another image that won't load in exiflibrary.

I've attached it Test

oozcitak commented 4 years ago

Interesting. Where does this image come from?

ziriax commented 4 years ago

FYI: ExifTool dump for this image is:

Note the warning Bad IFD0 directory

ExifTool Version Number         : 11.88
File Name                       : 91775699-f7798680-ebeb-11ea-8736-594c15519a94.jpg
Directory                       : .
File Size                       : 27 kB
File Modification Date/Time     : 2020:09:01 10:09:05+02:00
File Access Date/Time           : 2020:09:01 10:09:14+02:00
File Inode Change Date/Time     : 2020:09:01 10:09:05+02:00
File Permissions                : rwxrwxrwx
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Exif Byte Order                 : Big-endian (Motorola, MM)
Warning                         : Bad IFD0 directory
Image Width                     : 2236
Image Height                    : 1440
Encoding Process                : Progressive DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 2236x1440
Megapixels                      : 3.2
oozcitak commented 4 years ago

I added a similar warning. For this particular image the Orientation tag has a 2-byte value instead of 4.

Should be fixed in the new release.

ziriax commented 4 years ago

Isn't that insanely hard to deal with all possibly wrong metadata? It's a jungle out there ;)

devedse commented 4 years ago

I think I created this image by optimizing it using FileOptimizerFull. One of it's underlying tools probably corrupted the exif data then.

Thanks for the very quick fix though :)