I know that I can convert an entire slide to an image with ISlide.GetThumbnail as well as a single shape with IShape.GetThumbnail. Now what I would like to do is converting a set of shapes to an image. Can anyone suggest the best way to do this?
One idea that I had was grouping the relevant shapes into one shape. But I know that PowerPoint won’t allow grouping placeholder shapes. Therefore I suspect Aspose will run into issues with this approach too.
Another option would be copying the shapes to an empty slide or emptying the slide (i.e. delete other shapes, reset background, clear layout page) and then export the entire slide. A limitation would be that the background won’t be transparent but white.
I’ve performed some research and found Aspose.Slides allows you to group placeholders but there are some issues related to this capability. I do not recommend using this yet. Perhaps this is a bug. I added a ticket with ID SLIDESNET-43049 in our issue tracking system. Our development team will investigate this case. You will be notified when the issue is resolved. Perhaps it will be disabled as well.
You are right. ISlide.GetThumbnail method does not allow you to make the slide background transparent yet. I’ve linked this forum thread to an appropriate task with ID SLIDESNET-34701 in our issue tracking system. You will be notified when this feature is implemented.
As a workaround, you can perform the following steps to implement your requirements:
Find a necessary image size by positions and sizes of shapes.
Create a Bitmap object with the size found earlier.
Create a Graphics object from the Bitmap object.
Use IShape.GetThumbnail method to get shape images with transparency.
The issues you have found earlier (filed as SLIDESNET-43049) have been fixed in Aspose.Slides for .NET 22.6 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.