Setting the bit depth when converting to a tif

When converting a excel file to a tif (LZW compression) it creates the file with a 32 bit depth. The application I need to feed these into only supports 24 bit depth. How can I set the bit depth to 24 as I generate these images?

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

I think, this feature is not available at the moment.

So, I have logged a New Feature Request for this issue in our database with the issue id: CELLSNET-41066

Once, there is some update for you, we will share it with you asap.

Hi,

Thanks for using Aspose.Cells.

This new feature has been supported in our release:
Aspose.Cells for .NET 8.9.0.

Please see API: ImageOrPrintOptions.PixelFormat.


C#
Workbook wb = new Workbook(intputFile);
ImageOrPrintOptions imgOpts = new ImageOrPrintOptions();
imgOpts.ImageFormat = ImageFormat.Tiff;
imgOpts.TiffCompression = TiffCompression.CompressionLZW;
imgOpts.PixelFormat = PixelFormat.Format24bppRgb;
SheetRender sr = new SheetRender(wb.Worksheets[0], imgOpts);
sr.ToImage(0, outputFile_sheet.tiff);

WorkbookRender wr = new WorkbookRender(wb, imgOpts);
wr.ToImage(outputFile_workbook.tiff);