TransWikia.com

Why does GIMP increase the size of exported JPEG files?

Photography Asked by sarahluw on June 18, 2021

I’m using GIMP to edit some vacation pictures (JPEG files) taken with a rather old digital camera. Lacking a professional background, I just went about by trial and error and ended up adjusting the following parameters:

  • Images are way too dark —> Colors > Levels > Input Levels > Increase Clamp Input, decrease High Input
  • Colors could be more vibrant —> Colors > Auto > Color Enhance

When exporting the edited files, I noticed that the file size has increased by a factor of 3, i.e. files less than 3 MB in size are now 10 MB or larger. What is causing this and is there any way to prevent this without trading away image quality?

2 Answers

A difference between the settings used by GIMP and your digital camera likely explains the change in file sizes you're seeing. By default, GIMP appears to export JPEGs with quality 97 without subsampling. Many older digital cameras may use quality settings around 80-90 with subsampling. Using the first photo I encountered on my computer, saving with Q=90 + 4:2:2 subsampling resulted in a 3.9MB file. But saving with Q=97 + 4:4:4 subsampling resulted in a 14.1MB file. The change in file size is about 3.6x.

To maximize efficiency (lost data vs change in file size) when resaving JPEGs, it's usually preferable to use settings that are as close to the original as possible. GIMP has an option to facilitate this: Use quality settings from original image.


When exporting to JPEG, there are several settings that affect file size. The primary settings to consider are in bold.

  • Quality. Digital cameras usually use a setting similar to 94-98.
  • Arithmetic coding. Don't enable this setting. Such files will not work with most image viewers or web browsers.
  • Subsampling. Digital cameras usually use "4:2:2 horizontal (chroma halved)". Pick the option that halves the longer dimension.
  • Optimize. This just optimizes some compression internals. Doesn't hurt to enable. Space savings are moderate.
  • Progressive. Better to leave it off. Space savings are minimal, and files take longer to decode.

Export JPEG settings

Answered by xiota on June 18, 2021

It seems that GIMP is not able to guess the appropriate compression settings for your photos and artificially boosts the "quality".

Don't let the "Use quality settings from original image" option deceive you. Unless the original JPEG is saved by the same library (and in your case, it is not, because it was produced by the camera firmware) the quality parameter is just a guess. This means that using smaller quality settings does not necessarilly mean that we are compressing the image more than the original, especially when the original was created by a different code. Increasing the file size by a factor of 3 is a strong hint that the quality parameter is too high.

Your editing (increasing the contrast and saturation) makes the image less compressible for JPEG so the file should be just slightly bigger. Simply decrease the image quality during export until the file size is reasonable.

Answered by szulat on June 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP