How can I stack JPEG exports for comparison without adding more compression?
Asked 4/20/2025
2 views
2 answers
0
I exported the same photo at one resolution using three JPEG quality settings (20, 50, and 95) and want to combine them into a single vertical comparison image. For example, if each JPEG is 2047×1367, the final file would be about 2047×4101 with the three versions stacked top to bottom.
I tried this in GIMP. I don’t want to save the combined image as JPEG because that would recompress it. But when I export as PNG or TIFF, the file becomes much larger than the three original JPEGs combined. Is that expected?
What’s the best way to create a comparison image that stays as close as possible to the original JPEG exports, and why does the stacked PNG/TIFF get so much bigger?
Originally by jakedn. Source · Licensed CC BY-SA 4.0
jakedn
1y ago
2 Answers
1
- Yes. However, I would not use big images like this, because the areas that you want to compare are 1367 pixels apart. It would be better to use much smaller images, maybe make a mosaic with an extract of significant parts of the original image.
- You are creating a 2047x4001 and a 2047x4001 image is 8 megapixels: in a format without compression, with one byte per color channel per pixel (3 bytes per pixel), this is 24 megabytes. JPEG and the other "lossy" compression schemes do better because they discard some information that makes little difference for the average human eye. Non-lossy formats such as TIFF1 and PNG perform some compression, but on a random photo, this is never as efficient as a lossy one2. I assume that you have removed all the baggage in the PNG (embedded thumbnail, metadata, etc.).
Btw, if you export with Gimp, besides quality there is another option that has a significant influence on quality and file size: chroma sub-sampling (part of the "advanced options").
1 TIFF can also compress the data using the JPEG algorithm, so it is not always non-lossy
2 PNG is, however, much more efficient than JPEG at compressing CGI.
Originally by xenoid. Source · Licensed CC BY-SA 4.0
xenoid
1y ago
0
Generated from our catalog & community — verify before relying on it.
Yes, the larger PNG/TIFF size is expected. Your source files are JPEGs, which are lossy and highly compressed. Once you place them into an editor, they’re decoded into full pixel data. Saving the combined image as PNG or TIFF preserves those pixels without further JPEG loss, but lossless formats usually compress photographic images much less efficiently than JPEG.
So the size increase is mainly because:
- the final image has about 3× the pixel area of one source image
- PNG/TIFF are lossless, while JPEG throws away data to stay small
If your goal is the closest possible visual result, exporting the stacked image as PNG or lossless TIFF is the right approach. A 10 MB file for an image around 2047×4101 is not unusual.
For easier comparison, consider making a mosaic of smaller crops from important areas instead of stacking full images vertically; that makes differences easier to inspect and often keeps file size down.
Recommended products
UniqueBot
AI1y ago
Your Answer
Related Questions
Should I export a RAW photo as PNG instead of JPEG for large prints?
Does Flickr recompress JPEGs you upload?
Why is my focus-stacked TIFF so large after saving from Photoshop?
Can I add a white border to a JPEG without reducing image quality?
Why do most DSLRs offer JPEG as the only processed format instead of a lossless RGB format?