Gimp-Forum.net
Scaling an image to a fixed file size - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Scaling an image to a fixed file size (/Thread-Scaling-an-image-to-a-fixed-file-size)



Scaling an image to a fixed file size - julescousins - 04-24-2024

Hi there, newbie here.
I am a very basic user, doing simple, repetitive tasks, which typically involve cropping an image to a rectangular aspect ratio of 1.308:1 but to different pixel sizes. The online service the pictures are intended for has a maximum file size of 187kb per image, so I then scale my images, which are of different file sizes (so I can't use a default percentage scale), possibly 2 or 3 times until it is just under 187kb. 
Is there an easier way to scale my cropped image to a fixed file size?
Many thanks,
Jules.


RE: Scaling an image to a fixed file size - rich2005 - 04-24-2024

(04-24-2024, 10:07 AM)julescousins Wrote: Hi there, newbie here.
I am a very basic user, doing simple, repetitive tasks, which typically involve cropping an image to a rectangular aspect ratio of 1.308:1 but to different pixel sizes. The online service the pictures are intended for has a maximum file size of 187kb per image, so I then scale my images, which are of different file sizes (so I can't use a default percentage scale), possibly 2 or 3 times until it is just under 187kb. 
Is there an easier way to scale my cropped image to a fixed file size?
Many thanks,
Jules.

An easier way ? I do not think so, You can get a file size estimate in Gimp but only for jpeg exports. 
In the jpeg export dialogue 
Set the sub-sampling to 4:2:2 - that gives smaller file sizes
Enable the show preview option and above that is a file size estimate that changes with the compression setting.

Depends on end use, but I would say, if the required compression value comes out below 70 then cancel the export / resize and try again.

[attachment=11741]


RE: Scaling an image to a fixed file size - PixLab - 04-24-2024

Maybe try this website > https://imagecompressor.11zon.com/en/resize-image/resize-image-to-187kb

it keeps the original file type and the ratio, just add multiple images then click the "Download zip" button, all below 187kb, and it seems free (at least for my tests)

[attachment=11742]


RE: Scaling an image to a fixed file size - julescousins - 04-26-2024

Thank you for those replies. I'll give them a go! ?


RE: Scaling an image to a fixed file size - denzjos - 04-26-2024

To scale a batch of photos to a given maximum size you can use RIOT :

https://riot-optimizer.com
[attachment=11770]
Possible tasks :  
[attachment=11771]
Fill in maximum file size :
[attachment=11772]