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

Bruce Steers bsteers4 at gmail.com
Mon Feb 21 14:21:56 CET 2022


On Mon, 21 Feb 2022, 09:57 Martin Belmonte, <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220221/9f5738c5/attachment.htm>


More information about the User mailing list