Conversion to tiff image

When we convert a PNG document to a tiff image, how do we convert to a 24 bit resolution tiff image rather than a 32 bit image which is currently happening? Is this configurable?

We appreciate if you could prioritize this issue as we are having a critical production issue.

Hi Balaji,


Thanks for contacting support and sorry for the delayed response.

As your query appears to be related to Aspose.Imaging, so I am moving this thread to respective forum. My fellow workers from respective team will further look into this matter and will reply accordingly.
Hi Balaji,

Thank you for your inquiry.

Please note that you can set bit resolution 24 while converting PNG image to TIFF image format. Following is the sample code snippet for your reference.

//Load an image through file path location or stream
Image image = Image.load(sourceFilePath);

//Create an instance of TiffOptions while specifying desired format
//Passing TiffExpectedFormat.TiffJpegRGB will set the compression to Jpeg
//and BitsPerPixel according to the RGB color space
TiffOptions options = new TiffOptions(TiffExpectedFormat.TiffJpegRGB);

//define an arry of integers
int[] intArry = { 8, 8, 8 };

//set the Bits per sample
options.setBitsPerSample(intArry);
//Save the result in Tiff format RGB with Jpeg compression
image.save(destinationFilePath, options);

Hope the above information helps. Feel free to contact us in case you have further comments or queries.