We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ReplaceImage Throws Exception: Unable to Read beyond the End of the Stream


We are receiving a unexpected error trying to update the image of a shape. If I use overloads that replace image with the bytes parameter all seems fine. Any advise how I should update the shapes ?
Thanks in advance, I include a sample project with the latest slides version that reproduces the error.

IPPImage image = null;
foreach (var shape in list)
	if (shape is IPictureFrame pictureFrame)
		if (image == null)
			image = _presentation.Images.AddImage(bytes);


AsposeSlidesTestProject.zip (2.5 MB)

Thank you for reporting the issue.

I’ve reproduced the problem with replacing the image in the presentation and added a ticket with ID SLIDESNET-43187 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate this case. You will be notified when the issue is resolved.