0

I took a picture with my phone device and it is a jpg image that weighs about 8 MB.

I believe that compressing it will greatly reduce the file size.

I can't compress it in tinyPNG because it's more than 5 MB but I was able to compress it with iloveimg.com and reduce file size from 8 MB to about 1.2 MB.

Anyway, I would still like to ask how to compress an image with Gimp?

1
  • When you export as a JPEG from GIMP, you can adjust the compression settings using the quality slider. Less quality = more compression. There's no point exporting a JPEG as a PNG in GIMP. You will get a larger file size,, not smaller.
    – Billy Kerr
    Feb 10 at 2:05

1 Answer 1

1

Compressing an photo is a matter of compromise. You will always lose data and the compressed photo will never be as good as the original. Your only choice is what kind of data (or combination thereof) you shed:

  • You can reduce the colors. This is what is done by many PNG "compressors", the ultimate step being the color-indexed images (with only 256 colors in the image, every pixel can be encoded on one byte). This is best avoided for photography.

  • You can reduce the pixels by scaling/cropping the image. If your 12MPix (4000×3000) image is 8MB, and you make it twice as small (2000×1500), you have divided the pixel count by 4 and with the same compression technique and parameters your file is 4 times smaller. This typically what happens when you "share" the image from your phone, the sharing apps make a smaller a version of the image.

  • You can reduce the definition in several more complex ways (a little bit of everything....), which is what is done in JPEG compression.

With Gimp:

  • Depending on intended usage, the first thing to do is to scale the image to a reasonable size. I cannot give hard numbers but something that fits a HD TV image is 1920×1080 (3830×2160 for 4K). This is done with Image > Scale image:

enter image description here

You can then export to file. Use File > Export as, pick a directory, and change the name to avoid overwriting your original image:

enter image description here

You then get this dialog:

enter image description here

And after clicking these two:

  • Gimp displays a preview of the image as it will be saved
  • The options dialog becomes this:

enter image description here

Your main option is the Quality slider, but the Subsampling option is often overlooked. The dialog shows you in real-time the size of the resulting file, while the preview is updated to show the resulting image, so you can check how far you can go quality-wise.

2
  • Your comments on the start of the answer about types of compression and data loss are very important - I suggest also adding a suggestion to make a backup of the original image before compressing it with tool whatsoever. Gimp copies-changes-pastes it in a different file ("exports") yes but not necessarily any program will do that, hence I think adding a note about backups is so important. Feb 10 at 23:40
  • Backups are always useful even if you don't compress. Added a suggestion to change the name in the export dialog to avoid overwriting the source.
    – xenoid
    Feb 10 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.