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 : Monday, July 24, 2006 7:31:06 AM(UTC)

rrouse  
rrouse

Groups: Registered
Posts: 3


I am using LEADTools 14.0 in a VB6 environment. I wanted to make use of the LEADThumb control to display thumbnails of every page in a multi-page TIFF doc. The documentation is pretty scant. I tried using the sample code in a simple test program, but it seems to do nothing; the "ThumbnailEvent" event never seems to fire at all.

This is the code; it is a simple form with a single button and the LEADThumb control:

Option Explicit

Private Sub Command1_Click()

   Dim strFile As String
   
   strFile = "C:\temp\1.tif"
   LEADThumb1.LoadStamp = False
   LEADThumb1.ForceSize = True
   LEADThumb1.ThumbnailBackgroundColor = vbGreen
   LEADThumb1.ThumbnailWidth = 80
   LEADThumb1.ThumbnailHeight = 40
   LEADThumb1.CreateThumbnailFromFile strFile, 1
   
End Sub

Private Sub LEADThumb1_ThumbnailEvent(ByVal Bitmap As Long, ByVal pszFilename As String, ByVal nStatusCode As Integer, ByVal nPercent As Integer)
    MsgBox "fire"
    If (nStatusCode = 0 And nPercent = 0 And Bitmap <> 0) Then
        MsgBox "Done loading " + pszFilename
    End If
End Sub

btw - if I set the "EnableMethodErrors" property to TRUE, I get an error that says "20789 - LEAD Error: ColorSpace - Invalid Structure size"

I have also tried the LEADRasterImgList control, but it seems to have issues with DragAndDrop (I'd like the user to be able to select images from the thumbnails, and drag & drop them to create a new document).

If this is a known bug in the 14.0 and corrected in 14.5, I'd like to know if the ImageList control is a better bet, since reconfiguring everything for new installation files is a lot of work for adding a small feature...

Any help is appreciated....

Bob

 

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 : Thursday, July 27, 2006 3:44:09 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

If you are trying to view a Multipage TIFF image as thumbnails using the LEADThumb and LEADImgList controls, you can do this in two ways:
(1) You can use the LEADThumb.CreateThumbnailFromFile method to create the thumbnail for each page in the multipage TIFF file, and then process each page in the ThumbnailEvent event and add the image page to the LEADImgList control to view it, as follows:
+--------------------+
Private Sub Command1_Click()
Dim i As Integer
LEADThumb1.EnableMethodErrors = True
LEADThumb1.LoadStamp = False
LEADThumb1.ForceSize = True
LEADThumb1.ThumbnailBackgroundColor = vbGreen
LEADThumb1.ThumbnailWidth = 80
LEADThumb1.ThumbnailHeight = 40
For i = 1 To 14
LEADThumb1.CreateThumbnailFromFile "c:\fax1.tif", i
Next i
End Sub

Private Sub LEADThumb1_ThumbnailEvent(ByVal Bitmap As Long, ByVal pszFilename As String, ByVal nStatusCode As Integer, ByVal nPercent As Integer)
If (Bitmap <> 0) Then
LEADImgList1.Insert Bitmap, "", 1
End If
End Sub
+--------------------+

(2) You can use the LEADImgList control only to view the Multipage TIFF file as thumbnails by using the LEADImgList.LoadFromFile method as follows:
+----------------+
Private Sub Command2_Click()
LEADImgList1.LoadFromFile "c:\fax1.tif", 0, 0, -1
End Sub
+----------------+

About the error "20789 - LEAD Error: ColorSpace - Invalid Structure size", what is the exact method or property that causes this error?
 
About the drag and drop issue with the LEADImgList control, LEADTOOLS provides properties and events that support the drag and drop process in the ImageList control. The properties and events of the ImageList control let you drag an image that is open in one ImageList control and drop it in another ImageList control.

For more information, please refer to the LEADTOOLS documentation and read the following topic:
- Drag and Drop

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.169 seconds.