Home | About us | Overview | Softwares - Downloads | Evaluate | Order | Support | old forums | Contact | F.A.Q. | Documentations | Search | Sitemap

Creating a set of thumbnails

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

Creating a set of thumbnails

Postby varcarme on Tue Sep 16, 2008 5:19 pm

Hi Loic

Maybe I'm going about this entirely the wrong way?

I want to create <x> number of thumbnail images from one multi-page TIFF image.

Here's the code I'm using:

Code: Select all

oImage = ThisForm.oGDPicture.TiffCreateMultiPageFromFile(ThisForm.cWorkImg)

ThisForm.oGDPicture.TiffSelectPage(oImage, 3)   //Select page 3

oThumb = ThisForm.oGDPicture.CreateThumbnail(oImage, 50, 50)   // Create New Image 50 x 50

ThisForm.oGDPicture.TiffSaveMultiPageToFile(oThumb, "LOCAL\WORK\XXX.TIF")



Can you help?
varcarme
 
Posts: 24
Joined: Tue Feb 05, 2008 9:56 pm

Re: Creating a set of thumbnails

Postby Loïc on Tue Sep 16, 2008 6:38 pm

Do you want to create a thubmnail of the page 3 of your multipage tiff ?

If yes:

Code: Select all
oThumb = Imaging1.CreateThumbnail(oImage, 50, 50)
ThisForm.oGDPicture.SetNativeImage (oThumb)
ThisForm.oGDPicture.SaveAsJPEG ("thumb.jpg")
ThisForm.oGDPicture.CloseImage (oThumb)
ThisForm.oGDPicture.SetNativeImage (oImage)


Best regards,

Loïc
User avatar
Loïc
Site Admin
 
Posts: 1350
Joined: Tue Oct 17, 2006 11:48 pm
Location: France

Re: Creating a set of thumbnails

Postby varcarme on Wed Sep 17, 2008 12:16 pm

Thanks Loïc

I noticed though that the resulting JPEG ( or TIFF if I use ThisForm.oGDPicture.SaveAsTIFF() ) has the same dimensions as the original image.

I assumed that it would be a) much smaller in size (kb) than the original and b) be smaller in terms of it's dimensions

Am I missing something?
varcarme
 
Posts: 24
Joined: Tue Feb 05, 2008 9:56 pm

Re: Creating a set of thumbnails

Postby Loïc on Thu Sep 18, 2008 3:29 pm

Hi,

Normally, you should get a 50 per 50 pixel bitmap.
If your original image is larger that 50x50 the resulting saved thumbnail must be smaller.

Check first, the resulting thumbnail dimensions. If it has no 50x50 size you have an error in your code. If you don't know what, write here the code snippet you are using and I will correct it.


Best regards,

Loïc
User avatar
Loïc
Site Admin
 
Posts: 1350
Joined: Tue Oct 17, 2006 11:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 0 guests