New to Telerik Document ProcessingStart a free 30-day trial

Exporting Images in .NET Standard

Updated on Feb 19, 2026

.NET Standard specification does not define APIs for getting the image properties. SpreadProcessing needs to have access to GDI+ basic graphics functionality when exporting spreadsheets that contain images. That is why, to allow the library to get the image properties needed for saving the workbook, an implementation inheriting the ImagePropertiesResolverBase abstract class must be set to the ImagePropertiesResolver property of SpreadExtensibilityManager.

The Telerik.Documents.ImageUtils package provides a default implementation of the ImagePropertiesResolver class that could be used when exporting the document.

Example 1: Set the default implementation of the ImagePropertiesResolver class

csharp

    ImagePropertiesResolverBase imagePropertiesResolver = new ImagePropertiesResolver();
    SpreadExtensibilityManager.ImagePropertiesResolver = imagePropertiesResolver;

Example 2: Windows Example: Create a custom implementation inheriting the ImagePropertiesResolverBase abstract class

csharp

    public class ImageInfo : ImagePropertiesResolverBase
    {
        public override Size GetImageSize(byte[] imageData)
        {
            MemoryStream stream = new MemoryStream(imageData);
            using (var image = new System.Drawing.Bitmap(stream))
            {
                return new Size(image.Width, image.Height);
            }
        }
    }

Example 3: Set the custom implementation inheriting the ImagePropertiesResolverBase abstract class

csharp

    ImagePropertiesResolverBase imagePropertiesResolver = new ImageInfo();
    SpreadExtensibilityManager.ImagePropertiesResolver = imagePropertiesResolver;

See Also

In this article
See Also
Not finding the help you need?
Contact Support