We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set the color mode of the output TIFF file

Greetings,

Is it possible to set the color mode (Colored, Black and white, Greyscale) option for the output TIFF while converting an Excel file to TIFF?

Looking for an urgent reply.

Regards,
Syed.

Hi !

You can set ImageOrPrintOptions.TiffCompression to change color mode.

Thanks!

Fisher,

Thank you for the reply.

But I am only able to set the TiffCompression (Lzw, None, etc.). I can’t see any property that can control the color mode (black and white, colored, greyscale) of the output file. Am I missing something?

Regards,
Syed.

Hi,


Well you may use CompressionCCITT4 and CompressionCCITT3 to take the black & white image. Also, you may use: CompressionLZW to render colored image.

e.g

ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.ImageFormat = ImageFormat.Tiff;
imgOptions.HorizontalResolution = 300;
imgOptions.VerticalResolution = 300;
imgOptions.TiffCompression = Aspose.Cells.Rendering.TiffCompression.CompressionCCITT4;