Note.. The divided images will only be used in the program and will not be saved out.
Here is a moc version of my spilt function
private Bitmap[] spiltImage(Bitmap wImage)
{
Stopwatch timer = new Stopwatch();
List<Bitmap> images = new List<Bitmap>();
Rectangle cropArea = new Rectangle(400, 477, 400, 477);
Bitmap bmpImage = new Bitmap(cropArea.Width, cropArea.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bmpImage);
timer.Start();
for (int y = 0; y < 10; y++)
{
for (int x = 0; x < 10; x++)
{
g.Clear(Color.Black);
g.DrawImage(wImage, -cropArea.X * x, -cropArea.Y * y);
images.Add(new Bitmap(bmpImage));
label2.Text = "X: " + x + " Y: " + y;
Application.DoEvents();
}
}
timer.Stop();
MessageBox.Show(timer.Elapsed.ToString());
return images.ToArray();
}
Any ideas?

New Topic/Question
Reply



MultiQuote







|