manipulating thumbnail MS access.

Discussions about image processing and document imaging.
Post Reply
champagne_charly
Posts: 6
Joined: Sun May 27, 2007 1:38 pm

manipulating thumbnail MS access.

Post by champagne_charly » Sun Apr 13, 2008 2:05 am

Hope somebody can help me on the following:

a) How do I get the text/label to be below the thumbnail instead of to its right?

b) Also when I change the orders of the images using drag and drop. Is it possible to get a string of all the keys in the order that they are found in the list? Objective is to be able to save the file with the pages in the modified order.
i.e
3 images; move image3 to position2 : string I want to get its 1,3,2 as oppsed to the original 1,2,3.

c) Instead of using the Viewer to load and loop throught hte images producing the thumbnails. is there not a faster method? maybe just using the GDimaging? Or soemthing else maybe?

Code I have used to load images is as follows.

Code: Select all

Option Compare Database
Option Explicit

Public imgLstObj As MSComctlLib.ImageList

Public Function FctloadImgLst(VIEWER As Object, OGdImaging As Object, OImageList As Object, OListView As Object, VForm As Form, ByVal SFileName As String)
              Dim nThumbnailID As Long
              Dim nCpt As Integer
                
           '     Dim OListView As ListView

     On Error GoTo Form_Current_Error:
        


10      VIEWER.SetLicenseNumber ("**")
20        OGdImaging.SetLicenseNumber ("**")
30            VIEWER.ZoomMode = GdPicturePro5.ViewerZoomMode.ZoomFitToControl
40            VIEWER.LockControl = True
50            VIEWER.PdfDpiRendering = 5
60            VIEWER.DisplayFromPdfFile (SFileName)
              
              
70                    OListView.SmallIcons = Nothing
80    OImageList.ListImages.Clear
90    OListView.ListItems.Clear

100         OImageList.ImageHeight = (70)
110          OImageList.ImageWidth = (70)
              
120             If VIEWER.GetNativeImage <> 0 Then

130               For nCpt = 1 To IIf(VIEWER.PageCount > 20, 20, VIEWER.PageCount)

140                   VIEWER.DisplayFrame (nCpt)
150                   nThumbnailID = OGdImaging.CreateThumbnailHQ(VIEWER.GetNativeImage, 70, 70)
160                   OGdImaging.SetNativeImage (nThumbnailID)
170               OImageList.ListImages.Add , "image" & Trim(nCpt), OGdImaging.GetPicture


180     Set OListView.SmallIcons = OImageList.Object
190    OListView.View = lvwSmallIcon


200     OListView.ListItems.Add , "image" & Trim(nCpt), "page " & Trim(nCpt), , "image" & Trim(nCpt)

210                   OGdImaging.CloseImage (nThumbnailID)
220               Next nCpt

230           End If
240
250                       OGdImaging.CloseImage (nThumbnailID)

Form_Current_Exit:
260   Exit Function
Form_Current_Error:
          
270   MSgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Fct_FctLoadImgLst of VBA Document Mod_" & "Error from Line No: " & Erl
280   Debug.Print "Error No: " & Err.Number
290   Debug.Print "Error Description: " & Err.Description
300       Debug.Print "Error from Line No: " & Erl
310       Resume Form_Current_Exit
End Function

Dabi123
Posts: 22
Joined: Mon Apr 28, 2008 9:28 pm

Re: manipulating thumbnail MS access.

Post by Dabi123 » Tue Apr 29, 2008 10:39 pm

Hi,
were you able to figure out how to change the ordering of pages via drag n drop. Though the page order changes in the thumbnail view, the viewer does not reflect the changes?
Thanks

champagne_charly
Posts: 6
Joined: Sun May 27, 2007 1:38 pm

Re: manipulating thumbnail MS access.

Post by champagne_charly » Fri May 16, 2008 3:47 pm

Hi, unfortunately I did not take it any further. Have you managed?

Dabi123
Posts: 22
Joined: Mon Apr 28, 2008 9:28 pm

Re: manipulating thumbnail MS access.

Post by Dabi123 » Mon May 19, 2008 3:14 pm

Hi, yes it works now. I am creating a clone of the image being dragged and saving it as temp file:

AxImaging1.TiffSelectPage(AKCommon.ImageID, draggedIndex + 1)
iClonedImageID = AxImaging1.CreateClonedImageI(AxImaging1.GetNativeImage)
AxImaging1.SaveAsTIFF(tempFile)
AxImaging1.CloseImage(iClonedImageID)
AxImaging1.SetNativeImage(AKCommon.ImageID) 'original file
AxImaging1.TiffInsertPageFromFile(AKCommon.ImageID, itemIndex + 1, tempFile)
If AxImaging1.GetStat = 0 Then
AxImaging1.TiffDeletePage(AxImaging1.GetNativeImage, draggedIndex + 2)
If AxImaging1.GetStat = 0 Then
If System.IO.File.Exists(tempFile) Then
System.IO.File.Delete(tempFile)
End If
End If
End If

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest