[Gambas-user] Picture.ToString() ?

Claus Dietrich claus.dietrich at freenet.de
Thu Jan 4 07:03:33 CET 2024


Hi Bruce

Am 04.01.24 um 00:08 schrieb Claus Dietrich:
> png also supports "quality". As png is lossless the argument is mapped 
> to compression and leads to different filesizes (100 = maximum 
> filesize  and 0 = minimum filesize). 
Am 04.01.24 um 01:55 schrieb Bruce Steers:
> 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.

My tests with the self-made ToString-routine and the new ToString-method 
brought fully identical results, but also a surprise:

*Under QT5 with Target Format PNG*

Qual.  Length of String    Warning Message

0      443041              -
10     443896              -
20     445106              -
30     445402              -
40     447369              -
50     449461              -
60     478715              -
70     483797              -
80     486643              -
90     2475111             -
100    2475111             -

*Under GTK3**with Target Format PNG (same bitmap)***

Qual.  Length of String    Warning Message

0      502480 (Picture_To_String_0.0.2:15203): GdkPixbuf-WARNING ** .....
10     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
20     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
30     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
40     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
50     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
60     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
70     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
80     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
90     502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....
100    502480              (Picture_To_String_0.0.2:15203): 
GdkPixbuf-WARNING ** .....

As the Gambas-Buch team works with QT only I wasn't aware of this 
difference. However, I don't think, that this is a problem and I hope, 
that the warning message at the Save- and ToString-method can be 
eliminated. During the tests I also found that the GIF format as 
documented for the Save-method is actually not supported.

Best regards

Claus


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


More information about the User mailing list