Closed drewnoakes closed 7 years ago
Note there are two CFA Pattern tags. This should apply to both.
This is hard to piece together, but I think the difference is whether the file is RAW and possibly of certain flavors: http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml
Tag 0xA302 is the more general of the two and isn't RAW-specific. It's more difficult to work with since it's binary and you have to figure out the repeating pattern yourself. Tags 0x828D (repeat pattern dim) and 0x828E go together; the "repeat pattern" defines how many times the "cfa pattern" is repeated. Since neither is in a binary format, they can be used to reconstruct the entire CFA Pattern more easily. It appears most NEF files in the images repo set both tags but the rest appear to hold one or the other.
I put a "2" on the end of this description only to match Exiftool. Maybe Phil H. wanted to create some distinction but hard to say. It seems ok to not make a descriptive distinction here since they both - at least on the surface - describe the 'same' thing.
If there's ever some kind of "composite" directory, both of these Pattern tags could be replaced with one Composite. They describe the same data.
Thanks for delving into this and sharing your findings. The PR is great.
We can put the '2' suffix back in this name. For the new API I anticipate a distinction between a tag's friendly name and its ID. Currently these are the same thing, which makes it unclear whether to be human friendly or unique.
We currently show CFA pattern as a series of integers, for example:
From this site, these numbers map to filter colours:
So the above example could better be described as: