Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • 3 weeks later...
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...