I have a 32 bit color pdf page that I want to save to a tiff file. It appears that to save it out as a color tiff I must convert it to 24 bit color so that I can use SaveAsTIFFjpg to write the file out (or is there another way to write it out as a tiff with jpeg compression without having to convert it to 24 bit color?) . The problem is when I convert it to 24 bit color, it is all black. It doesn't matter whether I save it to file or just load it back into the viewer; it is all black. Here is the Delphi code I am using:
GdViewer1.PdfDpiRendering := 200;
status := GdViewer1.DisplayFromPdfFile('PDF Color.pdf','');
imaging.SetNativeImage(GdViewer1.GetNativeImage);
status := imaging.ConvertTo24BppRGB;
GdViewer1.SetNativeImage(imaging.GetNativeImage);
At this point the viewer shows all black. If I write the image out to a tiff file using:
status := imaging.SaveAsTIFFjpg('color.tif');
it too is all black.
What am I doing wrong?
