471,327 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,327 software developers and data experts.

extracting part of a graphic in a PictureBox

i need to extract a rectangular area from a graphic image displayed in a
PictureBox, to another PictureBox.

how can i do that? i would appreciate a piece of code if possible.

thanks,

ray
Jan 30 '06 #1
1 1713
using (Graphics graphics = image1.CreateGraphics())
{
graphics.DrawImage(image2.Image, new Rectangle(0, 0, 100,
100), new Rectangle(150, 150, 50, 50), GraphicsUnit.Pixel);
}

image1 and image2 are picture boxes

"ray well" wrote:
i need to extract a rectangular area from a graphic image displayed in a
PictureBox, to another PictureBox.

how can i do that? i would appreciate a piece of code if possible.

thanks,

ray

Jan 31 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Brian Ward | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.