New to Telerik UI for WPFStart a free 30-day trial

How To Display 8-bit Grayscale BitmapImage

Updated on Sep 15, 2025

Environment

Product Version2019.3.917
ProductRadImageEditor for WPF

Solution

To show a grayscale image, you can use the FormatConvertedBitmap class as shown in the following article. The following code snippet demonstrate this approach:

C#
	private void CreateGrayScaleImage()
	{
		var bmpImage = new BitmapImage();
		bmpImage.BeginInit();
		bmpImage.UriSource = new Uri(@"C:\images\myImage.png", UriKind.RelativeOrAbsolute);
		bmpImage.EndInit();

		var grayBitmap = new FormatConvertedBitmap();
		grayBitmap.BeginInit();
		grayBitmap.Source = bmpImage;
		grayBitmap.DestinationFormat = PixelFormats.Gray8;
		grayBitmap.EndInit();

		this.radImageEditor.Image = new RadBitmap(grayBitmap);
	}
In this article
EnvironmentSolution
Not finding the help you need?
Contact Support