A
Analizer1
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_Paint(object sender, PaintEventArgs e)
{
Console.WriteLine(this.pictureBox1.Image.Height);
Bitmap sourceImage = (Bitmap)this.pictureBox1.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 destinationRectangle = new Rectangle(0, 0, 32, 32);
// And this procedure draws it for us. Easy. OR IS IT?
e.Graphics.DrawImage(sourceImage, destinationRectangle, sourceRectangle,
GraphicsUnit.Pixel);
//DrawFromStripBitmap(sourceImage, 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_Paint(object sender, PaintEventArgs e)
{
Console.WriteLine(this.pictureBox1.Image.Height);
Bitmap sourceImage = (Bitmap)this.pictureBox1.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 destinationRectangle = new Rectangle(0, 0, 32, 32);
// And this procedure draws it for us. Easy. OR IS IT?
e.Graphics.DrawImage(sourceImage, destinationRectangle, sourceRectangle,
GraphicsUnit.Pixel);
//DrawFromStripBitmap(sourceImage, pictureBox3,3);
}