Software Development Network>> .NET Development>> extract part of a bitmap
I've actually just looked into this myself and this seems to work, perhaps with a bit more tinckering....
does this work for you I guess you need to play a bit with it to get the portion you want extracted from the original image
extract part of a bitmap
Brandon Bloom
araymund
I've actually just looked into this myself and this seems to work, perhaps with a bit more tinckering....
Bitmap myExtractedPortion = new Bitmap(width, height);
Rectangle destinationRect = new Rectangle(0, 0, width, height);
Graphics myGraphics = Graphics.FromImage(Image)myExtractedPortion);
myGraphics.DrawImage(Image.FromFile("file.jpg"), destinationRect, srcX, srcY, myExtractedPortion.Width, myExtractedPortion.Height, GraphicsUnit.Pixel);
myExtractedPortion.Save("newFile.jpg", System.Drawing.Imaging.ImageFormat.Jpg);
does this work for you I guess you need to play a bit with it to get the portion you want extracted from the original image
Tom Regan