Why are Darktable JPEG exports much larger than Nikon ViewNX or in-camera JPEGs?
Asked 7/29/2013
3 views
2 answers
0
I’m new to shooting RAW on a Nikon D3200. My RAW files are about 18–24 MB. If I convert them to JPEG in Nikon ViewNX 2 at maximum resolution, sRGB, and highest quality, I get files around 8–12 MB, similar to my camera’s highest-quality JPEGs.
When I export the same images from Darktable using sRGB, full resolution, and JPEG quality 100, the files are much larger—around 25–30 MB, sometimes even larger than the original RAW.
Why does this happen? Is Darktable using different JPEG compression settings? What export settings should I use to get smaller JPEGs without a noticeable quality loss?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
13y ago
2 Answers
13
Uncompressed RGB files (3 values per pixel) will be larger than your raws, as the raws contain a monochrome bitmap (1 value per pixel), and usually a downscaled, aggressively compressed preview that takes a fraction of the size, 400k for Canon 10MP cameras, and 1M for Nikon D5100 (I know these numbers because I used to read them out of the raw files and store them in a temporary file). Nikon NEFs store full res previews while Canon uses half res, hence the larger fraction.
So you can expect an uncompressed 16bit RGB "bitmap" to be approaching 3 times larger than the raw, and times 3 divided by 2 for 8bit uncompressed. A 16MP 8bit image is 48Mb uncompressed.
Now to the point, since we are talking about jpegs here. It is the uncompressed bitmap size that is the base size for the compression to work its way down from , not the raw size. This means that if you set the compression to be very gentle, it can easily still be larger than the raw.
The jpeg quality numbers are arbitrary - all you know for sure is that quality 100 is larger than 90, and 90 is larger than 80 in the same program. With the JPEGLIB that I use for my jpeg handling a 16MP image becomes 4Mb, and it quickly goes down to 1.7Mb at 95, at no perceivable quality hit. I normally keep it at 80, which is 950k. And flipping between the 4Mb and the 950k file at 100% zoom, I can see no difference. So it seems like overkill that your 100% is barely compressing at all.
So you should take an image with a lot of details and a clear sky, and save then at 100, 90,80,70,60,50, until you can see a quality hit. For your 24MP images you will probably hit that limit at around 1.5Mb, whichever the jpeg quality number that may be in your program.
Originally by user11455. Source · Licensed CC BY-SA 4.0
user11455
13y ago
0
Generated from our catalog & community — verify before relying on it.
Yes—this is normal. RAW and JPEG store image data very differently, and JPEG “quality 100” is not standardized across software. Different programs can produce very different file sizes at the same nominal quality.
The most likely reason is that Darktable is using less aggressive JPEG compression, possibly with less chroma subsampling, than Nikon ViewNX or the camera. That preserves more data but makes much larger files. A JPEG can even end up larger than the RAW because RAW is not a finished full-color RGB image in the same way a rendered JPEG is.
If you want smaller files, don’t use JPEG quality 100 unless you have a specific reason. For normal viewing and sharing, a quality setting in the low-to-mid 90s (for example 90–95) will usually reduce size significantly with little or no visible quality loss.
If you truly need lossless output, use TIFF instead of JPEG.
Recommended products
UniqueBot
AI13y ago
Your Answer
Related Questions
Why won't my JPEG get smaller enough for web use?
Why do JPEGs exported from GIMP become much larger than the originals?
Why is Microsoft ICE limiting my panorama export size when using RAW/DNG files?
How should I choose JPEG resolution and compression settings on my camera?
How can I stack JPEG exports for comparison without adding more compression?