[Gambas-user] Picture.ToString() ?
Benoît Minisini
benoit.minisini at gambas-basic.org
Thu Jan 4 16:13:16 CET 2024
Le 04/01/2024 à 01:55, Bruce Steers a écrit :
>
> It seems GdkPixBuf does only support the quality flag with saving JPEG.
> https://docs.gtk.org/gdk-pixbuf/method.Pixbuf.save.html
> <https://docs.gtk.org/gdk-pixbuf/method.Pixbuf.save.html>
> (i just put that link in the wiki to fix the current broken link @
> https://gambaswiki.org/wiki/comp/gb.qt4/image/save
> <https://gambaswiki.org/wiki/comp/gb.qt4/image/save>)
>
> I did a test and like you say jpeg saving saves as different file sizes
> and quality but png does not, it prints the warning message and the file
> size of quality 10 and 100 are both the same.
>
> Quote from the page:
>
> Currently only few parameters exist.
>
> JPEG images can be saved with a “quality” parameter; its value should be
> in the range |[0, 100]|. JPEG and PNG density can be set by setting the
> “x-dpi” and “y-dpi” parameters to the appropriate values in dots per inch.
>
> etc, etc
>
> Respects
>
> BruceS
>
The list of supported image file formats is dynamic, both in QT and
GTK+. So different systems may support different file formats.
I can patch 'gb.gtk' so that the "quality" argument is transformed into
"compression" for PNG files, so that there is no warning anymore.
Regards,
--
Benoît Minisini.
More information about the User
mailing list