[Gambas-user] Picture.ToString() ?

Bruce Steers bsteers4 at gmail.com
Thu Jan 4 16:40:48 CET 2024


On Thu, 4 Jan 2024 at 15:14, Benoît Minisini <
benoit.minisini at gambas-basic.org> wrote:

> 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.
>

Ok cool,
Does that technically mean png file sizes differ but quality remains the
same or does "compression" effect quality too?
when checking out the qt png saved files i could not really visibly see any
difference in 2 files where one was twice the file size as the other.

(just so i know when i update the wiki info)
Thank you Benoit :)

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240104/0d98ba7f/attachment.htm>


More information about the User mailing list