Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is Gimp JPG so large?
#1
Hi there, I'm trying to save a relatively large image in Gimp as a JPG and the size of the JPG is super big. For comparison, please see attached images showing file size for the Gimp JPG vs another JPG (not from Gimp) of the same dimensions, but about 32 MB smaller in size. Any ideas as to why the Gimp JPG version is so large and what can be done to decrease it? Thanks!


Attached Files Thumbnail(s)
       
Reply
#2
What compression are you using?  Less compression equals smaller size. 85 you have not lost much quality.  Go less than 85 if you want even smaller size.
.
.
.


   
Reply
#3
The file size is modified by two factors:

  1. The "chroma-subsampling" (by far the best bang for the buck) in the advanced options. Quartered chroma yields half the size of full chroma, independently of the "quality" setting.
  2. Compression loss level (a.k.a. "quality"). The sweet spot is around 80-85.
Reply
#4
Thanks so much for replies and suggestions- Tried both and the compression/quality at 85 brings the document down to about 9 MB- Better, but still much larger than the other sample document of the same dimensions. Still not sure why Gimp seems to export the JPG's in a way that takes up so much space! Would really like it to take up the same, smaller amount of space as other documents I have of the same dimensions-
Reply
#5
Quote:...snip...Would really like it to take up the same, smaller amount of space as other documents I have of the same dimensions.

Well AFAIK you can get ImageMagick (IM) for MacOS and one command is compress to a (roughly) specific file size. Example: Quite a colorful jpeg scaled up in GIMP to your 10800x7200 = about 13 MB jpeg filesize, exported as 90 quality with chroma halved, no thumbnail, no colour profile. 

To recompress, The IM command is

Code:
convert a.jpg  -define jpeg:extent=2000kb newfile.jpg

Still using IM, the identify command, comparing the properties.

Image: a.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 10800x7200+0+0
  Resolution: 300x300
  Compression: JPEG
  Quality: 90
  Filesize: 12.8521MiB
-------------  
  Image: newfile.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 10800x7200+0+0
  Resolution: 300x300
  Print size: 36x24
  Compression: JPEG
  Quality: 10
  Filesize: 1882910B
  
Look at the estimated quality 10. I would be very wary compressing large images too much.
Reply
#6
(09-04-2022, 04:25 PM)hsmokey Wrote: Thanks so much for replies and suggestions- Tried both and the compression/quality at 85 brings the document down to about 9 MB- Better, but still much larger than the other sample document of the same dimensions. Still not sure why Gimp seems to export the JPG's in a way that takes up so much space! Would really like it to take up the same, smaller amount of space as other documents I have of the same dimensions-

Did you change the chroma subsampling?

Technically, Gimp is using the same code library as many other applications. But even for a given quality setting, the level of compression depends on the picture. A furry animal generates a bigger file that a plain wall because there is more detail to encode. Sometime just blurring the image a bit yields an important size reduction.
Reply
#7
(09-04-2022, 10:39 PM)Ofnuts Wrote: Technically, Gimp is using the same code library as many other applications. But even for a given quality setting, the level of compression depends on the picture. A furry animal generates a bigger file that a plain wall because there is more detail to encode. Sometime just blurring the image a bit yields an important size reduction.

I cannot agree more with @Ofnuts, depending what you did to this image in GIMP, for example just bringing up more sharpness, will increase the size of a JPG for the same compression ratio.

Just out of the jpg topic, do you mind if it's a webp? Usually webp have a lower size than jpg for the same compression ratio, you might want to try it out (just put the extension .webp instead of .jpg when exporting
Reply
#8
(09-04-2022, 04:25 PM)hsmokey Wrote: Thanks so much for replies and suggestions- Tried both and the compression/quality at 85 brings the document down to about 9 MB- Better, but still much larger than the other sample document of the same dimensions. Still not sure why Gimp seems to export the JPG's in a way that takes up so much space! Would really like it to take up the same, smaller amount of space as other documents I have of the same dimensions-

You have to know the compression ratio of the images you compare with. There are several applications that can do this.

For instance using ImageMagick identify command:

identify -format "Quality: %[quality] - Chroma subsampling: %[jpeg:_sampling-factor]\n" image.jpg

Yields:

Quality: 95 - Chroma subsampling: 2x1,1x1,1x1

There are several ways to denote the chroma-subsampling (they are detailed here) but the important thing isto check if the Gimp-generated files and your other files are using the same settings.

Note: remove the _ in jpeg:_sampling-factor. I had to add it to prevent semi-colon+s to be translated into a smiley.
Reply
#9
For a quick view with the different jpg compresions, you can use this free program : https://riot-optimizer.com
@ Ofnuts, thanks for the link to chroma subsampling
Reply


Forum Jump: