Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-convert-a-bitmapsource-to-a-different-pixelformat.md
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.3 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Convert a BitmapSource to a Different PixelFormat 03/30/2017
csharp
vb
BitmapSource objects [WPF], converting to indexed pixel format
converting images [WPF]
converting [WPF], BitmapSource objects to indexed pixel formats
converting [WPF], BitmapSource objects to palettized pixel format
BitmapSource objects [WPF], converting to palettized pixel format
cd9df1e4-d5dc-4f57-b67b-4ec67e086b33

How to: Convert a BitmapSource to a Different PixelFormat

This example demonstrates how to convert a xref:System.Windows.Media.Imaging.BitmapSource object (xref:System.Windows.Media.Imaging.BitmapImage) to a different xref:System.Windows.Media.PixelFormat using a xref:System.Windows.Media.Imaging.FormatConvertedBitmap.

Example

[!code-csharpImagingSnippetGallery_procedural_snip#PixelFormatConversion] [!code-vbImagingSnippetGallery_procedural_snip#PixelFormatConversion]

See also