Image zoom

Post your Gambas programming questions here.
Post Reply
User avatar
cogier
Site Admin
Posts: 1206
Joined: Wed Sep 21, 2016 2:22 pm
Location: Guernsey, Channel Islands

Image zoom

Post by cogier »

I am trying to magnify a webcam image. At present, I can see the webcam image in a MediaView and take a picture of the image and display it in a PictureBox. The part I can't work out is how to 'zoom in' on the image. I am aware that there may be issues with image quality when 'zoomed'.

I have attached some code that will give you an idea.

Any help appreciated.
WebCamViewer-0.1.tar.gz
You do not have the required permissions to view the files attached to this post.
User avatar
cogier
Site Admin
Posts: 1206
Joined: Wed Sep 21, 2016 2:22 pm
Location: Guernsey, Channel Islands

Re: Image zoom

Post by cogier »

I have made some progress: -
WebCamViewer-0.2.tar.gz
You do not have the required permissions to view the files attached to this post.
vuott
Regular
Posts: 310
Joined: Wed Apr 05, 2017 6:07 pm
Location: European Union

Re: Image zoom

Post by vuott »

Hello cogier,
by using your second code, it seems to me that the problem is basically solved.
Europaeus sum !

Amare memorentes atque deflentes ad mortem silenter labimur.
User avatar
cogier
Site Admin
Posts: 1206
Joined: Wed Sep 21, 2016 2:22 pm
Location: Guernsey, Channel Islands

Re: Image zoom

Post by cogier »

vuott wrote: Wed Jul 10, 2024 6:09 pm Hello cogier,
by using your second code, it seems to me that the problem is basically solved.
Thanks vuott. It is improving, I was just wondering if anybody else had any better ideas.
vuott
Regular
Posts: 310
Joined: Wed Apr 05, 2017 6:07 pm
Location: European Union

Re: Image zoom

Post by vuott »

Hello cogier,
just a question: ...why did not use ".Stretch()" Picture Method ?
Europaeus sum !

Amare memorentes atque deflentes ad mortem silenter labimur.
User avatar
cogier
Site Admin
Posts: 1206
Joined: Wed Sep 21, 2016 2:22 pm
Location: Guernsey, Channel Islands

Re: Image zoom

Post by cogier »

Hi vuott,

I set the PictureBox property to Stretch = True. I used Picture.Copy method to display the image. You can see all this in the WebCamViewer-0.2.tar.gz file above.

It works, but does not do what I want. The loss of picture quality as you zoom in is terrible! I would need a much better camera than the cheap webcam I am using.
Post Reply