Free Support Forum - aspose.com

Pptx slides 4.0: image quality still poor

Hello there,

Thanks for addressing the problem I addressed in http://www.aspose.com/community/forums/thread/199373/pptx-images-poor-quality.aspx.

I downloaded the update and tried it out.

I still see a difference between ppt and pptx, though the pptx image in the presentation is better than it was (with an image, originating from a jpg stream as source).

I have found workaround, in which I convert the image to a png stream first. Then the quality is identical (good) between ppt and pptx.Of course I'd rather do without the workaround.

I'll give you my code to clarify what I mean:

To ppt:

Private Sub _placePicture(ByVal slide As Aspose.Slides.Slide, ByVal imageStream As IO.Stream, ByVal position As picturePositions, ByVal sizeFactor As Single)

Dim picture As New Aspose.Slides.Picture(_presentation, imageStream)

_presentation.Pictures.Add(picture)

....

following some code to place the picture

To pptx:

Private Sub _placePictureex(ByVal slide As Aspose.Slides.Pptx.SlideEx, ByVal image As Drawing.Image, ByVal position As picturePositions, ByVal sizeFactor As Single)

'workaround for getting better image quality. If I don't convert image to png stream and than back to image,

'the quality of the image is bad.

Dim stream As New IO.MemoryStream

image.Save(stream, Drawing.Imaging.ImageFormat.Png)

image = Drawing.Bitmap.FromStream(stream)

Dim pptImage As Aspose.Slides.Pptx.ImageEx = _presentationEx.Images.AddImage(image)

...

following some code to place the picture

Hi,

Your query has been answered in this thread.