Theme-Aware SVG Renders the Wrong Theme Color on a Normal Slide

Summary

This is a follow-up to Theme-aware SVG Picture on a Slide Renders Static Fallback Fill Instead of the Resolved Theme Color, which you fixed in 26.6.0. That fix resolved the two configurations in that report, but a closely related case still renders incorrectly in Aspose.Slides for .NET 26.6.0.

A theme-aware SVG picture (class MsftOfcThm_Text1_Fill_v2, static fallback fill #FFFFFF) resolves to the wrong theme color when the same image part is displayed on two slides whose color maps differ:

  • Slide 1 uses a slide layout whose color map is an <a:overrideClrMapping> mapping tx1 → lt1, so on that slide tx1 resolves to white (correct).
  • Slide 2 uses the normal <a:masterClrMapping>, so tx1 resolves to dk1 = #000000 = black.

Aspose appears to resolve/cache the SVG’s color once for the shared image part and reuse slide 1’s white on slide 2. On slide 2 the rectangle renders white instead of black, while ordinary text on the same slide that also uses tx1 renders black correctly.

Environment

  • Aspose.Slides for .NET 26.6.0
  • .NET 10, Windows

Reproduction

SharedThemeAwareSvg.pptx (attached) — two slides, one theme:

Structure

  • One slide master, clrMap with tx1="dk1"; theme dk1 = #000000, lt1 = #FFFFFF.
  • Two layouts under that master:
    • Inherit layout — <a:masterClrMapping/>, so tx1 → dk1 → black.
    • Override layout — <a:overrideClrMapping ... tx1="lt1" .../>, so tx1 → lt1 → white.
  • One theme-aware SVG image part (MsftOfcThm_Text1_Fill_v2, fallback fill #FFFFFF), shown as a picture on both slides via the same image relationship target.
  • Slide 1 uses the Override layout; Slide 2 uses the Inherit layout.

Trigger

  • The same SVG image part appearing on the override-mapped slide is what makes slide 2’s copy resolve to white. Removing slide 1 (or pointing it at the Inherit layout) makes slide 2 render correctly.
  • The defect is resolution-dependent: it only appears once the SVG is rasterized above a certain pixel size. The repro renders at 1600 px wide.

Expected result

On slide 2, the SVG rectangle should resolve tx1 → dk1 and render black — as PowerPoint does, and as the header/footer text on the same slide (which also uses tx1) does.

Actual result (Aspose.Slides for .NET 26.6.0)

On slide 2, the SVG rectangle renders white (the static fallback fill), invisible inside the red frame.

Slide PowerPoint (ground truth) Aspose 26.6.0
1 (override layout) rectangle white rectangle white — agrees
2 (inherit layout) rectangle black rectangle white ← bug

Slide 1 renders identically in both engines, confirming the file itself is correct; only Aspose’s resolution on slide 2 is wrong. Compare Aspose_slide2.png (white) against PowerPoint_slide2.png (black).

Reproducing

dotnet run Reproduce.cs              # Aspose      -> Aspose_slide1.png, Aspose_slide2.png
pwsh -File ExportWithPowerPoint.ps1  # PowerPoint  -> PowerPoint_slide1.png, PowerPoint_slide2.png

Notes

  • This produces the same symptom as the earlier report (a theme-aware SVG using its static fallback fill instead of the resolved theme color), but in a configuration the 26.6.0 fix did not cover: the color leaking across slides through a shared SVG image part when one slide uses an overrideClrMapping.
  • bwMode on the picture is not relevant to the defect.

Attachment

AsposeBugReport3.zip (128.2 KB)

SharedThemeAwareSvg.pptx, Reproduce.cs, ExportWithPowerPoint.ps1, and the rendered comparison PNGs (Aspose_slide1/2.png, PowerPoint_slide1/2.png).

@jbutemplafy,
Thank you for reporting the issue. I have reproduced the problem where the black rectangle is rendered white when converting the slide to an image. We apologize for any inconvenience caused.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-45425

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.

1 Like

The issues you found earlier (filed as SLIDESNET-45425) have been resolved in Aspose.Slides for .NET 26.7 (ZIP, MSI, NuGet (Aspose.Slides for .NET), NuGet (Aspose.Slides.NET6.CrossPlatform)).
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.

1 Like