--- title: "How to: Convert an Image to Greyscale" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "images [WPF], converting to grayscale" - "converting [WPF], images to grayscale" - "grayscale [WPF], converting images to" ms.assetid: 77935ff0-4500-4307-9710-96999dcf579f --- # How to: Convert an Image to Greyscale This example shows how to convert an image to grayscale using . ## Example [!code-xaml[ImagingSnippetGallery_snip#FormatConvertedBitmapXamlExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/ImagingSnippetGallery_snip/CS/FormatConvertedBitmapExample.xaml#formatconvertedbitmapxamlexamplewholepage)] [!code-csharp[ImagingSnippetGallery_procedural_snip#FormatConvertedBitmapCodeExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/ImagingSnippetGallery_procedural_snip/CSharp/FormatConvertedBitmapExample.cs#formatconvertedbitmapcodeexamplewholepage)] [!code-vb[ImagingSnippetGallery_procedural_snip#FormatConvertedBitmapCodeExampleWholePage](~/samples/snippets/visualbasic/VS_Snippets_Wpf/ImagingSnippetGallery_procedural_snip/VB/FormatConvertedBitmapExample.vb#formatconvertedbitmapcodeexamplewholepage)] ## See also - [Use the Image Element](how-to-use-the-image-element.md) - [Crop an Image](how-to-crop-an-image.md) - [Rotate an Image](how-to-rotate-an-image.md)