Heres some sample code taht you coudl use.. you will need a unsage code
block for this, and compile it with the unsafe option
//Lock the images in memory so we can access them directly
originalBitmapData = originalBitmap.LockBits(new
Rectangle(0, 0, originalBitmap.Width, originalBitmap.Height),
ImageLockMode.ReadOnly, originalBitmap.PixelFormat);
comparisonBitmapData = comparisonBitmap.LockBits(new
Rectangle(0, 0, comparisonBitmap.Width, comparisonBitmap.Height),
ImageLockMode.ReadOnly, comparisonBitmap.PixelFormat);
outputBitmapData = outputBitmap.LockBits(new Rectangle(0, 0,
outputBitmap.Width, outputBitmap.Height), ImageLockMode.WriteOnly,
outputBitmap.PixelFormat);
//Get pointers to the first byte in each image
byte* originalScanPtr = (byte*)originalBitmapData.Scan0;
"Sergio Florez M." <se***********@hotmail.com> wrote in message
news:ek**************@TK2MSFTNGP11.phx.gbl...
How can I convert a Bitmap to a byte array? I've searched all over and
none of the code samples I've managed to find work.
Actually, I just need to create a Byte array starting from an Image
object.
--
El que persevera insiste
Sergio Florez M.
Medellín, Colombia