Below I can Draw a portion of a Bitmap to a control
what i would like to do is Save the Portion of a Bitmap
strip to a new bitmap 32x32
Can anybody help with this
Thanks
private void pictureBox2_Pai nt(object sender, PaintEventArgs e)
{
Console.WriteLi ne(this.picture Box1.Image.Heig ht);
Bitmap sourceImage = (Bitmap)this.pi ctureBox1.Image ; //.Image;
// Define The Part of Original bit map ive show to the form in a Picturebox
//256 below points to the 7th picture in the source bitmap
Rectangle sourceRectangle = new Rectangle(256,0 ,32,32);
//define the rectangle where to draw on the control this picture box
Rectangle destinationRect angle = new Rectangle(0, 0, 32, 32);
// And this procedure draws it for us. Easy. OR IS IT?
e.Graphics.Draw Image(sourceIma ge, destinationRect angle, sourceRectangle ,
GraphicsUnit.Pi xel);
//DrawFromStripBi tmap(sourceImag e, pictureBox3,3);
}
what i would like to do is Save the Portion of a Bitmap
strip to a new bitmap 32x32
Can anybody help with this
Thanks
private void pictureBox2_Pai nt(object sender, PaintEventArgs e)
{
Console.WriteLi ne(this.picture Box1.Image.Heig ht);
Bitmap sourceImage = (Bitmap)this.pi ctureBox1.Image ; //.Image;
// Define The Part of Original bit map ive show to the form in a Picturebox
//256 below points to the 7th picture in the source bitmap
Rectangle sourceRectangle = new Rectangle(256,0 ,32,32);
//define the rectangle where to draw on the control this picture box
Rectangle destinationRect angle = new Rectangle(0, 0, 32, 32);
// And this procedure draws it for us. Easy. OR IS IT?
e.Graphics.Draw Image(sourceIma ge, destinationRect angle, sourceRectangle ,
GraphicsUnit.Pi xel);
//DrawFromStripBi tmap(sourceImag e, pictureBox3,3);
}