Loading...

Creating thumbnails with Delphi

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Creating thumbnails with Delphi

Postby miket » Sun Nov 01, 2009 10:10 pm

Hi,
I am using a sample I saw on this forum for creating thumbnails for a multipage PDF or TIF, but my problem is that the thumbnails are all the same image (page 1). Can you tell me what I'm doing wrong? I am using Delphi 5.

Here is my code:

Code: Select all
  ImageList1.Clear;
  ListView1.Items.Clear;
  Bitmap := TBitmap.Create;

  if MainImage.GetNativeImage <> 0 then begin
    For nCpt := 1 To MainImage.PageCount do begin
      MainImage.DisplayFrame(nCpt);
      nThumbnailID := cImaging1.CreateThumbnailHQ(MainImage.GetNativeImage, 100, 100);
      cImaging1.SetNativeImage(nThumbnailID);
      Bitmap.Handle := cImaging1.GetHBitmap;
      ImageList1.Add(Bitmap,nil);
      ListItem := ListView1.Items.Add;
      ListItem.Caption := 'Page ' + IntToStr(nCpt);
      cImaging1.CloseImage(nThumbnailID);
    end;
    MainImage.PdfDpiRendering := 120;
    MainImage.LockControl := False;
    MainImage.DisplayFrame(1);
  end;


Thanks for the help!
miket
 
Posts: 1
Joined: Sun Nov 01, 2009 9:55 pm

Re: Creating thumbnails with Delphi

Postby Loïc » Mon Nov 02, 2009 11:59 am

Hi,

Please, send us your Delphi test application to esupport (at) gdpicture (dot) com.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron