How to limit the weight of an image to a specified amount of MB
Gilles Caulier
caulier.gilles at gmail.com
Tue Sep 24 15:36:04 BST 2024
Le mar. 24 sept. 2024 à 16:33, Jonathan Kamens <jik at kamens.us> a écrit :
>
> On 9/24/24 10:30 AM, Remco Viëtor wrote:
>
> On mardi 24 septembre 2024 20:08:54 CEST Michel Cambron wrote:
>
> Bonjour DigiKam Team,
>
> Digikam has a feature to resize the image by modifying the number of
> pixels but is there a way to limit the final size of a jpeg ( export or
> transform) to a specified limit, example limit the size at 2.0 MB ?
>
> I am using version 8.4 on Window 11.
>
> Best regards,
>
> Michel
>
> As the amount of compression that can be obtained for a given quality level
> also depends on the image *content*, you cannot predict the final size of the
> resulting file. This is independant of the digikam version, or operating
> system, btw.
>
> The GIMP JPG export dialog displays in realtime the approximate size of the exported image as you move the image compression level slider, so it is apparently possible to at least estimate how big the an image is going to be when saved at a particular level even before you do the actual export.
In fact it's simple : You move the compression level cursor and a
thread recompte in memory the JPEG image to get the size of data that
you show on the dialog.
Gilles Caulier
More information about the Digikam-users
mailing list