Speaking of Microsoft’s Exif code…

Not exactly a WTF — it’s more of a ‘I can’t believe how lazy they can be’, but as an appendix to my previous post, I’ve noticed that Windows Explorer and other MS apps always rewrite Exif segments in big endian byte order, even when they were originally little endian. A bit odd one might think, given Windows itself is little endian, though understandable to the extent that the JPEG format as a container is always big endian. Alas, but any unicode strings that MS apps write are always written out in little endian format. For the Microsoft-defined tags in the general section (‘main IFD’) this doesn’t cause a problem — for those, MS can define them how it wants! — but for the standard UserComment tag it arguably does. That said, whilst my own Exif code defaults to saving in whatever was the original byte order (and if the user so wishes, he or she can force either big or little endianness), for the UserComment tag specifically, I follow Windows in always outputting UTF-16LE.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s