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?
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.
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.
tiff, an increase in file size is expected. For file sizes similar to the original
jpg, you need to use settings similar to the original. Look for a checkbox that says "Use quality settings from original image".