This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, July 31, 2007 12:16:28 AM(UTC)
Groups: Registered
Posts: 5
Hi..
i'm using LeadTools 14.5 in C# end I need transform an Iraster Image to an array of type byte[] (in fact it's ok still int[],float[]....)..
some Ideas to do it without to use a "for" for read all the pixels??
thanks..
good Time
#2
Posted
:
Wednesday, August 1, 2007 12:26:42 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Try the RasterImage.Data property which is a pointer to the raw image data in memory. The RasterImage.DataSize will give you the number of bytes. Use something like this to copy the data into your own byte[]:
IntPtr pData = (IntPtr)img.Image.Data;
byte[] data = new byte[img.Image.DataSize];
Marshal.Copy(pData, data, 0, data.Length);
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.