Potrzebuje zapisac fragment obrazu z jednej bitmapy do drugiej jednak nie umiem tego zrobic.Mam 10 zdjec i z kazdego zdjecia ma sie wyciac ten sam kwadracik w tym samym miejscu.Ma ktos jakies pomysly jak to zrobic?
0
0
bmp.Save("blabla.jpg", ImageFormat.Jpeg);
0
https://stackoverflow.com/questions/9484935/how-to-cut-a-part-of-image-in-c-sharp
public Bitmap CropImage(Bitmap source, Rectangle section)
{
// An empty bitmap which will hold the cropped image
Bitmap bmp = new Bitmap(section.Width, section.Height);
Graphics g = Graphics.FromImage(bmp);
// Draw the given area (section) of the source image
// at location 0,0 on the empty bitmap (bmp)
g.DrawImage(source, 0, 0, section, GraphicsUnit.Pixel);
return bmp;
}
// Example use:
Bitmap source = new Bitmap(@"C:\tulips.jpg");
Rectangle section = new Rectangle(new Point(12, 50), new Size(150, 150));
Bitmap CroppedImage = CropImage(source, section);