example.zip (103.8 KB)
Hello,
a big thanks for the aspose teams for the big help that ou provide for all our componenet (diagram,cells,words…).
our problem is simple. We have a png picture generated and we want to add it to a slide using the function AddPictureFrame. The problem is that the function stretch the image and the result is nit that readable. In the attached file you will find two Files. the first one is the real picture generated (tempImg.png) and the second one is the ppt file generated with the picture.(tempFile.ppt).
is there any function in aspose slide that helps making the god aspect ration between the generated picture and the frame created ?
one important thing is that we are still working with an old version (12) and we are wondering if there is anything in the set of the new versions that can help.
here is my code :
in = new FileInputStream(this.tempImgAbsolutePath);
Picture pic = new Picture(this.pptFile, in);
int picId = this.pptFile.getPictures().add(pic);
final int _X_PPT_DIAGRAM = 820;
final int _Y_PPT_DIAGRAM = 700;
final int _WIDTH_PPT_DIAGRAM = 4000;
final int _HEIGHT_PPT_DIAGRAM = 3200;
slide.getShapes().addPictureFrame(picId, _X_PPT_DIAGRAM, _Y_PPT_DIAGRAM, _WIDTH_PPT_DIAGRAM, _HEIGHT_PPT_DIAGRAM);
We want also now what’s the measure units used in aspose slide for the height and the width ?
i couldn’t found any reference in the documentation for this question.