What’s the difference between VueScan’s TIFF and DNG output for archival scans?
Asked 6/18/2016
6 views
2 answers
0
VueScan can save scans as TIFF or DNG, including what it labels as “raw.” In testing, the resulting files often have similar uncompressed sizes, while compressed TIFFs can differ a lot in size. ImageMagick also reports some metadata differences, and the raw versions appear darker when viewed.
For archival storage, what actually differs between VueScan’s TIFF and DNG output? Is the underlying pixel data the same, and if so, are the differences mainly metadata/structure/compression? Given VueScan specifically, is TIFF or DNG the better archival choice?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
10y ago
2 Answers
3
The image pixel data contained in raw TIFF and DNG files produced by VueScan is identical. This can be proved by extracting and comparing that data. This can be done using Linux dcraw and imagemagick command-line tools:
$ diff -s \
<(stream -map rgb -storage-type short raw.tif - | sha256sum) \
<(dcraw -E -4 -c raw.dng | tail -n +4 | dd conv=swab 2> /dev/null | sha256sum)
Files /dev/fd/63 and /dev/fd/62 are identical
(I won't muddy this answer with a technical explanation - add a comment if that would be of interest here.)
The overall file content, however, is different. A DNG file is a TIFF file with a specific structure that includes a low-resolution preview and special metadata. Of particular note are the following tags:
ColorMatrix1As Shot White XYBaseline Noise
These three tags are set by VueScan and used by a developer application (such as DarkTable) as an input colour profile (which DarkTable lists as embedded matrix). There are some other tags but they don't affect how the image is processed.
You can take a VueScan DNG and "re-scan" it into a raw TIFF and the pixel data in both files will be the same. You could alternatively use dcraw to do the same thing:
$ dcraw -E -4 -T raw.dng
So the issues raised in the question are not so much due to the differences between the file contents but how Darktable (or whatever) processes the different files. You can make a DNG look like a TIFF by removing the abovementioned tags and selecting the sRGB colour space.
With regard to file sizes - I haven't looked at the effectiveness of compression algorithms because it would appear to be, as others have suggested, dependent on the distribution of the input data. But, comparing like-for-like, the image bitmap data content is identical.
What remains unclear is how VueScan computes ColorMatrix1, AsShotWhiteXY and BaselineNoise.
Originally by user53188. Source · Licensed CC BY-SA 4.0
user53188
8y ago
0
Generated from our catalog & community — verify before relying on it.
According to the community testing, VueScan’s raw TIFF and raw DNG contain the same underlying pixel data. The main differences are in file structure and metadata, not the scan samples themselves.
DNG is essentially a TIFF-based raw container with a defined layout plus extra metadata, such as color/white-balance related tags, and often an embedded preview. That extra structure can make software display or interpret the file differently, even when the pixel values match. So the darker appearance and gamma reporting are likely due to how software reads the metadata, not different scan data.
Why file sizes differ: compression efficiency depends on the file layout and metadata as well as the image data. TIFF with LZW may compress better or worse than VueScan’s DNG/ZIP depending on the content, so large size differences do not necessarily mean different image pixels.
For archiving, either can preserve the scan data, but TIFF is the more universally supported archival format. DNG may be useful if you want a standardized raw-style container with raw metadata and broad support in raw workflows. If maximum compatibility is your goal, TIFF is the safer archival choice.
Recommended products
UniqueBot
AI10y ago
Your Answer
Related Questions
Can Canon Digital Photo Professional 4 export compressed TIFF files?
Are there drawbacks or compatibility issues with using LZW-compressed TIFFs for editing and archiving?
How Sony ARW delta compression relates to dynamic range
Does exporting JPEG directly from Lightroom give better quality than converting a Lightroom TIFF with ImageMagick?
Can a 16-bit TIFF be edited like a RAW file, or does RAW still retain more information?