Free Support Forum - aspose.com

Are .gif files not supported by aspose?

hi!!!

when i add a picture in a shape ..it only accepts .jpg files....

while mentioning .gif files ..it gives an exception

Shapes shapes = slides.get(0).getShapes();
com.aspose.powerpoint.Shape shape1 = shapes.get(4);

shape1.getFillFormat().setType(FillType.PICTURE);

InputStream is = new BufferedInputStream(new FileInputStream("picturepath...."));

Picture pic1 = new com.aspose.powerpoint.Picture(pres, is);

int picid1 = pres.getPictures().add(pic1);

shape1.getFillFormat().setPictureId(picid1);

Regards