I’ve read some post about this subject but my problème seems to be a bit different.
Actualy I get from an image from an URL, but when I want to use it in my presentation, the image appear really small, so I redemension it but I loose in quality.
I’m using the version 5.something (where could I get this information?)
Here is some of my code
int initXm = info.PptShape.X +info.PptShape.Width / 2; // mean horizontal
int initYm = info.PptShape.Y + info.PptShape.Height/2; // mean vertical
Slide sld = pres.GetSlideById(info.PptSlide);
Picture pic = new Picture(pres, strPicFile);
int picId = pres.Pictures.Add(pic);
int picWidth = pic.Image.Width;
int picHeight = pic.Image.Height;
double cfzoom = 6.0;
int x = initXm - (int) (picWidth* cfzoom) / 2;
int y = initYm - (int)(picHeight * cfzoom) / 2;
PictureFrame pf =sld.Shapes.AddPictureFrame(picId, x, y, (int) (picWidth * cfzoom), (int) (picHeight * cfzoom));
if (strPicLink != “”) pf.AddLink().SetExternalHyperlink(strPicLink);
info.Port.Text = “”;
sld.Shapes.Remove(info.PptShape);
If the zoom is at 1 I almost can not see the image on the slide.
I have to precise that my image is originaly about 40x100px in 150dpi
Any suggestions on what can be done to improve image quality?
To get real image size you should multiply width and height by 8.
Aspose.Slides doesn’t change images and insert it to presentation as is.
Bad image quality just means that image is too small.