Bug Report T1237115
Visible to All Users

SVG - The SvgBitmap.Render method throws an exception when the SVG file contains an embedded SVG image

created 10 months ago (modified 10 months ago)

Stack trace:

Code
System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'DevExpress.Drawing.DXImage' to type System.Drawing.Image. Use the DevExpress.Drawing.Extensions.DXImageExtensions.ConvertToGdiPlusImage method to convert DXImage object to Image. Source=DevExpress.Drawing.v23.2 StackTrace: DevExpress.Drawing.v23.2.dll!DevExpress.Drawing.Internal.SystemDrawingConverter.UnwrapImage(DevExpress.Drawing.DXImage image, bool throwException) Line 509 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgGraphics.DrawImage(DevExpress.Drawing.DXImage image, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect) Line 152 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgEmbeddedImageWrapper.RenderCore(DevExpress.Utils.Svg.ISvgGraphics g, double scale) Line 1483 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgElementWrapper.Render(DevExpress.Utils.Svg.ISvgGraphics g, DevExpress.Utils.Design.ISvgPaletteProvider paletteProvider, double scale) Line 150 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgElementWrapper.RenderChild(DevExpress.Utils.Svg.ISvgGraphics g, DevExpress.Utils.Design.ISvgPaletteProvider paletteProvider, double scale, DevExpress.Utils.Svg.SvgElementWrapper elementWrapper) Line 165 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgRootWrapper.Render(DevExpress.Utils.Svg.ISvgGraphics g, DevExpress.Utils.Design.ISvgPaletteProvider paletteProvider, double scale) Line 647 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgBitmap.RenderCore(System.Drawing.Size imageSize, DevExpress.Utils.Design.ISvgPaletteProvider paletteProvider, System.Drawing.Image bufferedImage, double scale, DevExpress.Utils.DefaultBoolean useHighSpeedRendering) Line 244 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgBitmap.Render(System.Drawing.Size imageSize, DevExpress.Utils.Design.ISvgPaletteProvider paletteProvider, DevExpress.Utils.DefaultBoolean useHighSpeedRendering, DevExpress.Utils.DefaultBoolean allowCache) Line 220 C# DevExpress.Drawing.v23.2.dll!DevExpress.Utils.Svg.SvgBitmap.Render(DevExpress.Utils.Design.ISvgPaletteProvider paletteProvider, double scaleFactor, DevExpress.Utils.DefaultBoolean useHighSpeedRendering, DevExpress.Utils.DefaultBoolean allowCache) Line 314 C# DevExpress.Utils.v23.2.dll!DevExpress.Utils.Svg.SvgBitmapExtension.Render(DevExpress.Utils.Svg.SvgBitmap this, DevExpress.Utils.Design.ISvgPaletteProvider palette) Line 50 C#

Answers approved by DevExpress Support

created 9 months ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Important Notes:

  • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
  • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.