Presentation background not converted correctly in image

The PresentationDocumentPage.Save method seems to render the page background differently when saving the file as image.

My application code:

var presentation = PresentationDocument.Load(inputPath);
        
var pages = presentation.GetPaginator().Pages;

for (var index = 0; index < pages.Count; index++)
{
      var fileName = $"Presentation_Page-{index}.bmp";
            
      var page = pages[index];
            
      using var stream = new FileStream(Path.Combine(outputDirectory, fileName), FileMode.Create);
            
      page.Save(stream, new ImageSaveOptions(ImageSaveFormat.Bmp));
}

What can I do to receive the correctly converted background in the image?

Hi Sarah,

Please send us your presentation so that we can reproduce this issue and investigate it.

Regards,
Mario

Sure, I attached it to a mail to info@gemboxsoftware.com

Hi Sarah,

Unfortunately, that shape is using two features that GemBox.Presentation’s rendering engine currently doesn’t support:

recolor

Regarding the first feature, we do plan to provide support for the PictureFillFormat.TileAsTexture property in the PDF sometime in the future (after more users request it).

But regarding the second feature, I’m afraid this feature won’t be available any time soon.

Regards,
Mario

Hi Mario,

thanks for the explanations :slight_smile:

I have another presentation, where the background is not taken from tiles but has the “Format-Background”-option “Hide Background Graphics” enabled. But the image generated by the code I pasted above does not hide the background graphics. Is this also a planned feature?

Kind regards,
Sarah

Hi Sarah,

Please try again with this bugfix:
https://www.gemboxsoftware.com/presentation/nightlybuilds/GBP25v1342.zip

Or this NuGet package:
Install-Package GemBox.Presentation -Version 25.0.1342-hotfix

Does this solve your issue?

Regards,
Mario

1 Like

Hi Mario,

the fix works for my background graphics, thank you!
My generated images now look quite similar to the original, only in case I used a semi transparent overlay in my background (slide master configured) the overlay is shown completely transparent. As the original questions on my topic are solved, should I open a new topic on this?

Kind regards,
Sarah

Yes Sarah, I think that would be better.