Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
[LocalizabilityAttribute(LocalizationCategory::None, Readability=Readability::Unreadable)] public ref class BitmapSource abstract : public ImageSource
/** @attribute LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable) */ public abstract class BitmapSource extends ImageSource
LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable) public abstract class BitmapSource extends ImageSource
BitmapSource is the basic building block of the Windows Presentation Foundation (WPF) imaging pipeline, conceptually representing a single, constant set of pixels at a certain size and resolution. A BitmapSource could be a single frame in an image file that a decoder provides, or it could be the result of a transform that operates on a BitmapSource of its own. BitmapSource is not used to represent a multi-frame image or an animation.
Windows Presentation Foundation (WPF) natively supports compression and decompression of bitmap (BMP), Graphics Interchange Format (GIF), Joint Photographics Experts Group (JPEG), Portable Network Graphics (PNG), and Tagged Image File Format (TIFF) images.
For bitmap decoding scenarios, BitmapSource uses automatic codec discovery, based on the installed codecs on the user's system.
The maximum height and width of an image is 2^16 pixels at 32 bits per channel * 4 channels. The maximum size of a BitmapSource is 2^32 bytes (64 gigabytes) and the maximum image size is four gigapixels. The minimum image size is 1x1.
The following code example demonstrates how to create a BitmapSource and use it as the source of an Image control.
The following code example uses a BitmapSource derived class, BitmapImage, to create a bitmap from an image file and use it as the source of an Image control.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.