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, August 8, 2006 3:12:20 AM(UTC)
FreezeRrR

Groups: Registered
Posts: 2


Hi, an example showing how to take an array of byte

and save it to a IO.MemoryStream and then use this stream to create the RasterImage object,

all this without passing through an intermediate Image object would

help me A LOT :) ....

 

thankx....

 

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 : Tuesday, August 8, 2006 3:14:35 AM(UTC)
FreezeRrR

Groups: Registered
Posts: 2


In VB.Net would be even nicer ;)
 
#3 Posted : Wednesday, August 9, 2006 3:51:22 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

If the byte array contains a complete image file (including headers), you can use the following code:
+--------------------------+
...
Dim MyImage As IRasterImage
fs.Read(byte1, 0, fs.Length)
' bytes and an array of type byte
Dim ms As MemoryStream
ms = New MemoryStream
ms.Write(byte1, 0, byte1.Length)
ms.Seek(0, SeekOrigin.Begin)
MyImage = codecs.Load(ms, 0, ms.Length)
...
+--------------------------+

If the array contains only image pixel data (raw image), you also use the Load method, but you will need to specify the raw format using the _codecs.Options.Load.Format property, and handle the _codecs.LoadInformation event. This is explained in the help file and shown in the main VB.NET demo.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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-2020, Yet Another Forum.NET
This page was generated in 0.129 seconds.