I'm currently working on a big project that involve pictures. One of the big issues I'm having is with the endianness of the picture (jpeg to be clearer). I always though that in our modern world we didn't have to botter about this subject, but now I'm not sure.
What I do:
These picture are then use in another module from my application which use a 3rd party "viewer" that do some manipulation to the image. The viewer works with all the picture generated using computer in Windows XP and Windows Vista. But when the picture are generated using a Windows 7 machine, the pictures is all messed up.
Let's say that the picture created with Windows XP will be called PictureXP and the picture created using Windows 7 will be called Picture7 I checked the files using exiftools and discover that there was 2 fields that were different between PictureXP and Picture7.
PictureXP: Exif Byte Order: Little-endian Picture7: Exif Byte Order: Big-endian Picture7 also have an additional field: User Comment: .
The two pictures can be opened normally in any photo viewer, it's only in this 3rd party viewer that the picture show up all mixed up and the only difference between the 3 pictures are these fields.
What I want to know:
Thanks a lot!
EDIT 1 : I found this article confirming that the endiannes found in the exif header is only applicable to the exif header and that a jpeg file is always in big-endian. So is there a way to change the exif header so the 3rd party soft would be able to read what he needs?
Ok so I found my answer by asking question to Phil, the author of exiftool
You can see the thread I had with him here.
In command line:
exiftool -all= -tagsfromfile test.jpg -all:all -unsafe -exifbyteorder=little-endian test.jpg
You can also found a wrapper for the tool in almost any language in this page.
Thanks a lot for your interest in the question and the answer I received.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With