Closed davidebbo closed 3 years ago
I tried the comparer implementation that allows duplicates from that SO question, and it makes the error go away. But I have no idea if that correct :)
Any chance you can attach the image?
It's a kid picture so I'd rather not share publicly, but I can email it to you if you give me an address.
@davidebbo Thanks, I sent you an email.
Fixed and released a new version.
I have one jpeg image (apparently from some Windows Phone) where I get this exception when calling
ImageFile.FromFile()
:I'm not familiar enough with the jpeg format to make sense of the code, but what I observe is that at the time of the exception,
ifdqueue
has 2 entries:[0] -> [384, GPS] [1] -> [562, First]
And then we try to insert a [384, Interop], which blows up because it already has the key 384.
If duplicates are expected, maybe the solution is to use a custom comparer that allows it, as in https://stackoverflow.com/a/21886340. Just a guess!
Awesome library by the way, I've used it successfully on many images!