Loading...

Getting Pixel Depth information from image

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

Getting Pixel Depth information from image

Postby JNewhouse » Mon Nov 16, 2009 9:52 pm

Hi Loic,

i'm trying to reduce the size of images that are converted in my application using the gdpicture ActiveX control.

Right now, i load the image into the view, copy each page into the imaging control then add the image to a new tiff file, kinda like so (a lot of other code left out):

Code: Select all
nVid = oViewer.DisplayFromPDFFile(cFile)
nIid = oImage.CreateClonedImageI(nVid)
oImage.TiffSaveAsNativeMultiPage(cNewFile,2)

FOR i = 2 TO nPageCnt
  oViewer.DisplayFrame(i)
  nVid = oViewer.GetNativeImage
  nIid = oImage.CreateClonedImageI(nVid)
  oImage.SetNativeImage(nIid)
  oImage.TiffAddToNativeMultiPage(nIid)
ENDFOR
oImage.TiffCloseNativeMultiPage

At the point where the image is copied into the oImage control, the pixel depth is 32Bpp even if the original image is 1Bpp.

I would like to recommend that the image copied into the Imaging control using "CreateClonedImageI" copy the image in it's original format, meaning if the original image is 1Bpp, then the resulting copied image is also 1Bpp.

If this is not possible, could you at least create a method to return the pixel depth of the original image?? My problem today as i try to reduce the size of the image is that i don't know the pixel depth of each page as it comes in. i know i can use the ConvertToNNBpp() functions to change the pixel depth but i'd like to convert it to it's original value.

Thanks As Always!!

jean-claude
JNewhouse
 
Posts: 41
Joined: Thu Nov 15, 2007 9:37 pm

Re: Getting Pixel Depth information from image

Postby Loïc » Sat Nov 21, 2009 12:21 pm

Hi Jean Claude,

You are not dealing with image but with PDF. A PDF doesn't provide information such as "PDF bitdepth" or stuff like that.


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

Re: Getting Pixel Depth information from image

Postby JNewhouse » Fri Dec 11, 2009 4:13 am

Hi Loic,

Okay, I understand. Alternately, would you be able to maybe add a parameter to the CreateClonedImage() method say, that would allow the programmer to define the pixel format at the point when the image is created? ie, oImage.CreateClonedImageI(nVid, NN) where NN is the value for the specified pixel format, so 1 = 1 bpp, 2 = 4bpp, 3 = 8bpp, etc.

once again, i'm trying to increase the speed of processing very large file which right now takes about 15-20 minutes. if i can shave even 3 or 4 minutes off this time, it would be great!

Thanks as always,

Jean-Claude
JNewhouse
 
Posts: 41
Joined: Thu Nov 15, 2007 9:37 pm


Return to GdPicture [Pro] ActiveX

Who is online

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

cron