Live data from Hacker News

Appreciating Exif

brentfitzgerald.com

31–40 of 40 posts

Re: Appreciating Exif

#31
post #30
post #19

Exif is totally unlike what modern developers would think of as a "file format". It's more like dumping a set of binary block data structures from memory to disk. This was efficient on old digital cameras with minimal hardware resources. But making any significant edits requires doing pointer arithmetic, which can be an alien concept for developers who have only ever used memory-safe programming languages.

>It's more like dumping a set of binary block data structures from memory to disk. That sounds exactly like a file format to me. Are you suggesting that json is the only format developers might be aware of?

I'm suggesting that newer developers will find Exif to be quite different from hierarchical file formats that use delimiters between data elements, as is common practice lately with XML / JSON / YAML / etc. And it is technically somewhat challenging to manipulate Exif using the most popular high-level languages. Obviously competent developers can overcome these challenges.

Re: Appreciating Exif

#32
post #3

Wrote a parser to extract image metadata once, and got massively frustrated with the amount of undocumented, semi-documented, wrongly documented, or partially documented attributes. You’ll find references online, but most of them lack half of what you encounter in images. Every image processing app under the sun adds its own range. Some use metric values, some imperial; finding out which can be guesswork. Aperture is…

A few years ago I wrote an exif parser too, solely for reading/editing text comments, which is much simpler than what you did. Even then, yes, it's not pretty, very frustrating. There are multiple places to put text in exif, and it took a while to find most (all?) the edge cases.

But now it's quite different with LLMs. I recently updated my code and Claude had useful recommendations.

Re: Appreciating Exif

#33
post #16
post #3

Wrote a parser to extract image metadata once, and got massively frustrated with the amount of undocumented, semi-documented, wrongly documented, or partially documented attributes. You’ll find references online, but most of them lack half of what you encounter in images. Every image processing app under the sun adds its own range. Some use metric values, some imperial; finding out which can be guesswork. Aperture is…

My hell was trying too make sense or and organise audio/music ID3 tags. What a nightmare that is. EXIF seems much nicer to me.

Picard is far from perfect, but it does more or less impose a semblance of uniformity across a large library.

Re: Appreciating Exif

#34

Exif is great but here is your obligatory reminder that if you are publishing images you should strip out some of the identifying information that cameras and image editing software likes to embed. In particular, you probably don’t want the GPS coordinates of your house publicly available on your blog for everyone to see.

On the other hand, the fact that exif is such a widespread standard has been a great tool for photo archaeology.

People who can track down the original exif can recreate when, where and with what equipment the photo was taken. It's been great to identify places and people for posterity.

Re: Appreciating Exif

#35
Date. Date and time. Approximate date. Conjectural dates like "before 1932" or "Easter, but maybe before 1905"

Date of capture/scan vs date of scanned artefact.

It's a minefield.

Adhoc methods like "month zero" or "nonce time" suck too.

Then there's how Google, Apple and Microsoft don't agree if file acquired EXIF data is mutable. Side cars. Search terms. Modified in system or by an API? Another minefield.

Post edit. Same or different image? Perceptual hash fine but can I track source image by a field in edited image?

Re: Appreciating Exif

#36
post #33
post #16

Earlier quoted context omitted.

My hell was trying too make sense or and organise audio/music ID3 tags. What a nightmare that is. EXIF seems much nicer to me.

Picard is far from perfect, but it does more or less impose a semblance of uniformity across a large library.

Yes, that's what I ended up using. I was wanting to program something myself but it was too difficult. MusicBrainz Picard [1] is excellent.

[1] https://picard.musicbrainz.org/

Re: Appreciating Exif

#37
post #3

Wrote a parser to extract image metadata once, and got massively frustrated with the amount of undocumented, semi-documented, wrongly documented, or partially documented attributes. You’ll find references online, but most of them lack half of what you encounter in images. Every image processing app under the sun adds its own range. Some use metric values, some imperial; finding out which can be guesswork. Aperture is…

Yes. I run a niche webapp[1] that extracts exif and xmp (Lightroom edits) from images. At one point I tried to write my own exif parser. It's not that complicated, but very quickly you'll run into weird legacy, vendor-specific nuances (apart from what the parent mentioned, you have to handle both big & little endian exif). And the long tail of those edge cases is, well, very long. Exiftool handles pretty much all of that.

[1] https://pixelpeeper.com/

Re: Appreciating Exif

#38
post #37
post #3

Wrote a parser to extract image metadata once, and got massively frustrated with the amount of undocumented, semi-documented, wrongly documented, or partially documented attributes. You’ll find references online, but most of them lack half of what you encounter in images. Every image processing app under the sun adds its own range. Some use metric values, some imperial; finding out which can be guesswork. Aperture is…

Yes. I run a niche webapp[1] that extracts exif and xmp (Lightroom edits) from images. At one point I tried to write my own exif parser. It's not that complicated, but very quickly you'll run into weird legacy, vendor-specific nuances (apart from what the parent mentioned, you have to handle both big & little endian exif). And the long tail of those edge cases is, well, very long. Exiftool handles pretty much all of…

Pixelpeeper looks amazing, by the way. Such a great idea, thank you for sharing.

Re: Appreciating Exif

#39
post #3

Wrote a parser to extract image metadata once, and got massively frustrated with the amount of undocumented, semi-documented, wrongly documented, or partially documented attributes. You’ll find references online, but most of them lack half of what you encounter in images. Every image processing app under the sun adds its own range. Some use metric values, some imperial; finding out which can be guesswork. Aperture is…

production-grade interpreters are always full of dirty works.

Re: Appreciating Exif

#40

As with most standards, there are three almost overlapping standards for image metadata. EXIF, IPTC and XMP. IPTC incidentally is hot again because certain generative AI providers add IPTC metadata[1] to the images they generate. Incidentally, OpenAI uses another standard for the same purpose, C2PA[2]. All of these, the author mentions. Now for SynthID[3], which both OpenAI and Google embed in the pixels of the image…

I suppose watermarks are metadata. Never considered it that way.
Post reply on HN