Hello
If you want to split image for 2 or even cut out few images from one image to others I would go with this approach.
-
Bitmap bmpToSplit = ...; // bitmap to be splitted
-
Bitmap split1 = new Bitmap(w1,h1,bmpToSplit.PixelFormat);
-
Bitmap split2 = new Bitmap(w2,h2,bmpToSplit.PixelFormat);
-
Graphics g1 = Graphics.FromImage(split1 as Image);
-
g1.DrawImage(bmpToSplit, new Rectangle(0,0,w1,h1), new Rectangle(xSplit1, ySplit1, w1,h1),GraphicsUnit.Pixel);
-
Graphics g2 = Graphics.FromImage(split2 as Image);
-
g2.DrawImage(bmpToSplit, new Rectangle(0,0,w2,h2), new Rectangle(xSplit2, ySplit2, w2,h2),GraphicsUnit.Pixel);
-
THe Point(xSplit#,ySplit#) is coordinate where first image is on original bitmap.
There is a lot things you can do with images with Graphics class.
cheers
AkipNG