This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, February 27, 2009 10:33:39 PM(UTC)
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?
#2
Posted
:
Monday, March 2, 2009 2:37:29 AM(UTC)
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.