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

Free Support Forum - aspose.com

Code sample to convert Powerpoint to tiff with specific dimensions

Hi Support,

Can you please provide me with a code sample to convert an powerpoint to tiff with dimensions width 1728pixels x height 2320 pixels, resolution : 300dpi, Compression CCITT4. Need this urgently.

Clive

Hi Clive,

Please use the following code snippet to generate the tiff image of slide with desired dimensions. I also like to add the Aspose.Slides for Java has default screen resolution for slides in presentation as 576 dot/inch. You may alter the DPI in your image somehow but the underlined DPI will remain 576. Please also visit this link (http://www.java-forums.org/java-applets/13546-image-resizing-dpi.html) for your kind reference for setting DPI of Image and compression.

PresentationEx pres=new PresentationEx();

double width=1728*(double)1/720;

double height=2320*(double)1/540;

for(int i=0;i<pres.getSlides().size ();i++)

{

BufferedImage img = pres.getSlides().get(i).getThumbnail((float)width, (float)height);

ImageIO.write(img, “TIFF”, new File(“D:\Aspose Data\Image_”+i+"_.tiff"));

}

Many Thanks,