Code sample to convert Powerpoint to tiff with specific dimensions

Last post 02-02-2012, 9:07 AM by Mudassir. 1 replies.
Sort Posts: Previous Next
  •  02-02-2012, 5:03 AM 358918

    Code sample to convert Powerpoint to tiff with specific dimensions .NET

    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

     
  •  02-02-2012, 9:07 AM 358969 in reply to 358918

    Re: Code sample to convert Powerpoint to tiff with specific dimensions

    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 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,

    Mudassir Fayyaz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
View as RSS news feed in XML