[Gambas-user] Image.Save method How to specify the DPI?

Gianluigi bagonergi at gmail.com
Mon Feb 21 14:47:20 CET 2022


Il giorno lun 21 feb 2022 alle ore 14:35 Benoît Minisini <g4mba5 at gmail.com>
ha scritto:

> Le 21/02/2022 à 14:21, Bruce Steers a écrit :
> >
> >
> > On Mon, 21 Feb 2022, 09:57 Martin Belmonte, <mbelmonte at belmotek.net
> > <mailto:mbelmonte at belmotek.net>> wrote:
> >
> >     Hi,
> >     When save method is called it require 2 arguments the file name and
> >     optionally the quality 0:100 or -1:100 depends if qt or gtk.
> >     I wan to save an image as 600x900 px in 96 dpi but... where specify
> the
> >     dpi? The result is always 300 dpi.
> >     Don't see any property in the image object to set the resolution.
> >
> >     img = Image.Load("/tmp/input.jpeg").Stretch(600, 900)
> >     img.Save("/tmp/output.jpeg")
> >
> >
> > I think dpi is a printing term 'dots per inch' and is to to with
> > printing and rendering but has nothing to do with image save data.
> >
> > BruceS
> >
>
> DPI is some metadata associated with some image file formats.
>
> At the moment Gambas does not know how to read or write these metadata.
>
> Regards,
>
> --
> Benoît Minisini
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

I would do this:
I would create with Gimp some useful templates for the program and then
draw the desired image over them.

Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220221/c66b004b/attachment.htm>


More information about the User mailing list