Error saving templates with PNG Images

@Thinian
Please try using the following code to set the width and height of shape’s xform and image.
If there are still issues, please provide the template file and code that generated the problem.
We will look into it.

        shape.getXForm().getPinX().setValue(1);
        shape.getXForm().getPinY().setValue(1);
        
        shape.getXForm().getWidth().setValue(2);
        shape.getXForm().getHeight().setValue(2);
        
        shape.getForeign().getImgWidth().setValue(2);
        shape.getForeign().getImgHeight().setValue(2); 

Thanks.

I am already doing all of that, still has the problem.

@Thinian

We are looking into this scenario and will get back to you soon.

@Thinian
Please provide the template file and code that generated the problem.
We will look into it.
Thanks.

I used what you posted after I first asked. And it worked, except for the problem that it does not scale when I use it in a diagram.

@Thinian
Please provide the code and file for this problem of not being able to scale the image.
We will checking it soon.
Thanks.