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
