This project has moved and is read-only. For the latest updates, please go here.

EXIF parser always return 0 for Short value ToString

Dec 24, 2013 at 4:47 PM
All Short values in the EXIF parser are returned as 0 when ToString is used. I'm looking through the source, but haven't put my finger on it yet. This was noticed when I tried to read Orientation so we can store the image's rotation in the database. It was 0, but then I noticed all non-array Short values return 0 also. Still investigating arrays of Short. Any thoughts on what it might be, or if I should use another method to get Short converted to string?

If you need an image to test on let me know, but it's easy enough if you have a phone that sets the Orientation tag.

Dec 24, 2013 at 4:50 PM
Also, just to be clear, this happens with ExifValue.ToString and ExifValue.Value.ToString
Dec 24, 2013 at 5:05 PM
Edited Dec 24, 2013 at 5:06 PM
Can you post a link to one of your images? I recently fixed a bug with short values in ImageMagick with tiff images. Does this error happen with a specific format?

P.s Next time feel free to edit your post instead of posting a new message.
Dec 24, 2013 at 5:49 PM
This is just a JPG that I took with my iPhone. I can't say if it's format related or not:


Sorry for the double-post... I don't post that often. :-)
Dec 24, 2013 at 8:53 PM
This seems to be an Endianness bug. I will create a work item to resolve this issue.
Dec 24, 2013 at 8:56 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.