Free Support Forum - aspose.com

Image replacement is not working

we are evaluating the Aspose for our product needs.
we have a requirement to replace the icons on fly in the template.
I’m trying this scenario using free version. I am still seeing the old image and don’t see the image getting replaced. does free version has any limitation? following is the code snippet. please let me know if I am doing wrong
{
Presentation ppt = new Presentation(“template.pptx”);
ISlideCollection slides = ppt.getSlides();
IShapeCollection shapes = slides.get_Item(0).getShapes();
List shapeList = new LinkedList<>();

    for(IShape shape : shapes){
        shapeList.addAll(getShapeList(shape));
    }
    BufferedImage image = ImageIO.read(new File( "sample.png"));
    IPPImage im1 = ppt.getImages().addImage(image);
    for(IShape s : shapeList){

        if(s.getName().equals("kf1")){
            s.getFillFormat().setFillType(FillType.Picture);
            s.getFillFormat().getPictureFillFormat().setPictureFillMode(PictureFillMode.Tile);
            PictureFrame pf = (PictureFrame) s;
            pf.getPictureFormat().getPicture().setImage(im1);
        }
    }

    ppt.save("out.pptx", SaveFormat.Pptx);

}

@satishsnv

I suggest you to please visit following thread for your convenience.