public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Conversion();
// Instantiate a Presentation object that represents a Presentation file
using (Presentation presentation = new Presentation(dataDir + "DemoFile.pptx"))
{
TiffOptions options = new TiffOptions();
options.PixelFormat = ImagePixelFormat.Format8bppIndexed;
/*
ImagePixelFormat contains the following values (as could be seen from documentation):
Format1bppIndexed; // 1 bits per pixel, indexed.
Format4bppIndexed; // 4 bits per pixel, indexed.
Format8bppIndexed; // 8 bits per pixel, indexed.
Format24bppRgb; // 24 bits per pixel, RGB.
Format32bppArgb; // 32 bits per pixel, ARGB.
*/
// Save the presentation to TIFF with specified image size
presentation.Save(dataDir + "Tiff_With_Custom_Image_Pixel_Format_out.tiff", SaveFormat.Tiff, options);
}
}
}