Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, July 31, 2007 12:16:28 AM(UTC)
manco_0607

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
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, August 1, 2007 12:26:42 PM(UTC)

GregR  
GregR

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.047 seconds.