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 : Friday, February 27, 2009 10:33:39 PM(UTC)

oaright  
oaright

Groups: Registered
Posts: 3


tested the vbopensavedemo project, it totally work fine. Then I want to use the rasterimage.getrow to read data of the image into a memory buffer, so I just add the folllowing code into the class ImageFileLoader:
Dim myrownumbers As Integer = 1
Dim mybuffer As IntPtr
Dim value As Integer
Dim mycount As Integer =_image.BytesPerLine
value = _image.GetRow(myrownumbers,mybuffer, mycount)

But an error always happen which indicates that invalid parameter passed which happened in the code of value = _image.GetRow(myrownumbers,mybuffer, mycount).

Who can help me with this problem, I am just starting using the Leadtools SDk.
After modifying the last part of the class ImageFileLoader cod is like this:
If (autoLoad AndAlso ok) Then
wait = New WaitCursor
Try
_image = codecs.Load(FileName, 0, CodecsLoadByteOrder.BgrOrGray, firstPage, lastPage)
Finally
wait.Dispose()
End Try
End If
End If

Dim myrownumbers As Integer = 1
Dim mybuffer As IntPtr
Dim value As Integer
Dim mycount As Integer = _image.BytesPerLine
value = _image.GetRow(myrownumbers, mybuffer, mycount)
Return ok
End Function

Pls help me I just want to convert the djvu file into a memory without compressed. Would some one give me some advices?
 

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 : Monday, March 2, 2009 2:37:29 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

To retrieve image data from a RasterImage into a managed memory buffer, please use the following code:
+-----------+
Dim row1(LeadImage.BytesPerLine * LeadImage.Height) As Byte
LeadImage.GetRow(0, row1, 0, LeadImage.BytesPerLine * LeadImage.Height)
+-----------+
This will copy the FULL image, not just one line.

If you need only line alone, change the size from (LeadImage.BytesPerLine * LeadImage.Height) to (LeadImage.BytesPerLine)

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-2024, Yet Another Forum.NET
This page was generated in 0.064 seconds.