Page 1 of 1

How to stretch the image when the user resizes the window in Scale Desktop 125% and 150% display mode?

Posted: Sat Nov 02, 2024 11:36 am
by hdt888
I have 1 more window and 1 ImageGadget.
I experimented with 3 screen display scaling modes: 100% / 125% / 150%.
When i resize the window the image is distorted.

How to stretch the image for ImageGadget() when the user resizes the window in Scale Desktop 100% / 125% / 150% display mode?

Thank for support.

Re: How to stretch the image for ImageGadget() when the user resizes the window in Scale Desktop 125% and 150% display m

Posted: Sat Nov 02, 2024 12:27 pm
by RASHAD
Hi
1 - Keep the original image as it is let us say it's Image 0
2- Copy image 0 to 1 then resize 1 to 125 % and use it
3- Copy image 0 to 2 then resize 2 to 150 % and use it
And so on

Re: How to stretch the image for ImageGadget() when the user resizes the window in Scale Desktop 125% and 150% display m

Posted: Sat Nov 02, 2024 11:26 pm
by Fred
It's also better to have a larger original image and scale it down to lower resolution to avoid blur

Re: How to stretch the image when the user resizes the window in Scale Desktop 125% and 150% display mode?

Posted: Mon Nov 04, 2024 5:16 am
by hdt888
thanks RASHAD, Fred.

I modified the code, using only 5 basic functions, everything works smoothly.
CopyImage(), ResizeImage(), FreeImage(), SetGadgetState(), DesktopResolutionX().