[Gambas-user] ImageView Content Scaling
Nigel Verity
nigelverity at ...67...
Wed Jul 6 20:16:53 CEST 2016
Hi
I need to display images on a form with some descriptive text.
The form contains an imageview control sized at 400 x 300 px. The images it will display will be sized at 1600 x 1200, which is 4x the size of the imageview.
I am loading the image using the following code:
=======
Dim myImg as Image
myImg = image.load("/path/to/image.jpg")
imageView1.image = myImg
=======
This displays the image full size within the control, with horizontal and vertical scroll bars.
I would like to display the full image within the imageview control without any need to scroll e.g at 0.25 original size.
Using imageView1.Zoomfit() reduces the image to a very small thumbnail - too small for my requirements.
Is there any way to scale the image to a user-defined scale factor?
Thanks
Nige
More information about the User
mailing list