I am using “Circuit” theme for the attached PPTX file which has a picture fill and a dark grey background style. When I create a Aspose.Slides.Presentation using this PPTX file and look at the effective background it generates, it does not show the background color (dark grey). I have attached the background image for your reference. slide.zip (1.7 MB)
I have noticed this behavior with other such similar themes as well which have picture fill. As an example, pls find attached a sample.pptx with “Ion” Theme which produces gray background image - image.jpg (obtained by using Aspose.Slides.Background.GetEffective()). example2.zip (1.2 MB)
Sure, let me try explaining with an example. If you unzip example2.zip (1.2 MB)
you will find sample.pptx in it. This file is the input to the following code. Lets us assume that this file is kept at m_szPptxPath path.
//Create a Presentation from sample.pptx file
Presentation m_Presentation = new Presentation(m_szPptxPath);
//Get effective background
IBackgroundEffectiveData effectiveBackground = m_Presentation.Slides[0].Background.GetEffective();
//Get the image used for the background and save it to image.jpg
System.Drawing.Image systemImage = effectiveBackground.FillFormat.PictureFillFormat.Picture.Image.SystemImage;
systemImage.Save("C:\\image.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
The background in sample.pptx does not match the background image.jpg obtained from Aspose. The color is not the same. Hope this explains the problem. Pls let me know if you need further details.
I followed the steps and checked image1.jpeg. It is the same image which I see as the effective background image returned from Aspose. But, this image does not capture the theme color. I also tried the two lines given below:
I do get the theme color from it. Aspose does not seem to take this color into account while determining the effective background image of a slide. How can I get the right background color for the slide image ? Do I need to do any post processing on the effective background image provided by Aspose and the theme color obtained from masterSlide.Background.StyleColor? Pls advise. Thanks
@bhav,
If I understand correctly, you would like to extract the final background applied to slides as an image. Could you please confirm?
Please note that some shapes may be added when a theme is applied to the presentation: ion_theme.jpg (86.7 KB). Do your requirements include having such shapes in the final background image?
We have opened the following new ticket(s) in our internal issue tracking system and will implement such a feature according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESNET-44833
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.