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

Bruce Steers bsteers4 at gmail.com
Mon Feb 21 16:04:31 CET 2022


On Mon, 21 Feb 2022 at 13:35, Benoît Minisini <g4mba5 at gmail.com> wrote:

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

haha,
Well mine is not to argue with those who know best and it looks like some
actually have a use for an image having a dots per inch data.

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220221/64be9e19/attachment-0001.htm>


More information about the User mailing list