Hi,
I am generating the Thumbnail from .pptx output is not as expected please help. I am using aspose 19.3. please investigate on both the .pptx file provided below.
Code I am Using:-
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
import com.aspose.slides.ISlide;
import com.aspose.slides.Presentation;
public class App
{
public static void main( String[] args )
{
try {
//Instantiate a Presentation class that represents the PPTX file
Presentation pres = new Presentation("/home/user/Desktop/project/new/uBundle copy.pptx");
//Access the first slide
ISlide sld = pres.getSlides().get_Item(0);
//Create a full scale image
BufferedImage image = sld.getThumbnail(1f, 1f);
//Save the image to disk in JPEG format
ImageIO.write(image,"jpeg",new File("/home/user/Downloads/task/uBundle copy generated output.jpg"));
System.out.println("File is ready");
} catch (Exception e) {
e.printStackTrace();
}
}
}
Input source file:
new.zip (72.5 KB)
Generated Output:
PreCheck MyScript generated output.jpg (58.1 KB)
uBundle copy generated output.jpg (59.0 KB)
Expected Output:
Expected OutPut.jpg (114.4 KB)
uBundle copy.jpg (117.6 KB)
Thanks.
Saquib