Hi im trying to write a function to split one image into a d2 image array well i got this far
But only the first([0,0]) image in the array works the rest of them just turn blank i dont get why or if i did do any thing wrong..
Tnx for any help you can offer!!
Code:
public Image[,] SplitImages(Image image, int rows, int columns)
{
Image[,] images = new Image[rows, columns];
for (int row = 0; row < rows; row++)
{
for (int colum = 0; colum < columns; colum++)
{
images[row, colum] = new Bitmap(image.Width/rows,image.Height/columns);
Graphics g = Graphics.FromImage(images[row, colum]);
g.DrawImageUnscaled(image, (image.Width / rows) * row, (image.Height / columns) * colum,
(image.Width / rows), (image.Height / columns));
}
}
return images;
}
But only the first([0,0]) image in the array works the rest of them just turn blank i dont get why or if i did do any thing wrong..
Tnx for any help you can offer!!