Copying a stretched image from a PictureBox to another picturebox

qmp

Member
Joined
May 23, 2005
Messages
14
I have a picturebox with an image property set to a standard jpg file and the properties set to stretch the image to fit the picturebox size..

Now, what I want to do is copy a section from that picture box (with the new stretched image) to a seperate picture box.

So the second picturebox would have a copy of the stretched image, not the original image..

How do I copy, say a 100x100 chunk of the stretched picturebox image to another picturebox?

I am so far only able to copy the image in its unstretched form.
 
You want to copy a chunk of the image or the whole image?

As for the whole image, as far as I know, you do not have access to the stretched image in the picturebox, you simply must take the bitmap and resize it the size of the picturebox. The bitmap class has resizing functions.

As for the chunk, the easiest way may be to create a bitmap brush and paint the picturebox background with it. Size the picturebox the size of the chunk you want.
 
Back
Top