Magick.NET
Magick.NET copied to clipboard
Can not support ansi exif info
Magick.NET version
13.3.3
Environment (Operating system, version and so on)
Windows10, net framework 4.7.2
Description
Incorrect reading of exif information for Chinese encoding
it is read in windows
The default encoding of the ParseCombiningCharacters function is Unicode. Can it support ansi or utf8?
Steps to Reproduce
none
Good evening 🙂
UTF8 decoding is already in place.
https://github.com/dlemstra/Magick.NET/blob/258d2304773fab778aada86ca6eda04e23f0e8e2/src/Magick.NET.Core/Profiles/EndianReader.cs#L99-L115
Using exiftool and exif, I got the same kind of error:
$ exif 6.jpg
Corrupt data
The data provided does not follow the specification.
ExifData: Bogus offset of IFD1.
$ exiftool 6.jpg
ExifToolVersion = 12.76
FileName = 6.jpg
Directory = /my/home/folder
FileSize = 977852
FileModifyDate = 1703844382
FileAccessDate = 1707495764
FileInodeChangeDate = 1707495761
FilePermissions = 33204
FileType = JPEG
FileTypeExtension = JPG
MIMEType = image/jpeg
JPEG APP0 (14 bytes):
+ [BinaryData directory, 9 bytes]
| JFIFVersion = 1 1
| ResolutionUnit = 1
| XResolution = 300
| YResolution = 300
| ThumbnailWidth = 0
| ThumbnailHeight = 0
JPEG APP1 (340 bytes):
ExifByteOrder = II
+ [IFD0 directory with 7 entries]
| 0) ExifVersion = V 7.
| Warning = Tag ID 0x0131 Software out of sequence in IFD0
| 1) Software = ......................V7.0
| 2) Artist = ............................
| Warning = Tag ID 0x010d DocumentName out of sequence in IFD0
| 3) DocumentName = ..........
| 4) FNumber = 1.40129846432482e-45
| 5) BrightnessValue = 2.80259692864963e-43
| 6) Exif_0x9c40 = .
| Warning = Bad IFD1 directory
JPEG DQT (65 bytes):
JPEG DQT (65 bytes):
JPEG SOF0 (15 bytes):
ImageWidth = 2480
ImageHeight = 3507
EncodingProcess = 0
BitsPerSample = 8
ColorComponents = 3
YCbCrSubSampling = 2 2
JPEG DHT (29 bytes):
JPEG DHT (179 bytes):
JPEG DHT (29 bytes):
JPEG DHT (179 bytes):
JPEG SOS
I'm not saying there is no bug regarding exif reader; could you provide a "well formated" file?
Regards.