Image​Encoding​Properties Image​Encoding​Properties Image​Encoding​Properties Class

Definition

Describes the format of an image stream.

public : sealed class ImageEncodingProperties : IImageEncodingProperties, IMediaEncodingPropertiespublic sealed class ImageEncodingProperties : IImageEncodingProperties, IMediaEncodingPropertiesPublic NotInheritable Class ImageEncodingProperties Implements IImageEncodingProperties, IMediaEncodingProperties
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For how-to guidance for using ImageEncodingProperties to set the encoding properties for captured images, see Basic photo, video, and audio capture with MediaCapture.

Constructors

ImageEncodingProperties() ImageEncodingProperties() ImageEncodingProperties()

Creates a new instance of the ImageEncodingProperties class.

public : ImageEncodingProperties()public ImageEncodingProperties()Public Sub New()
Attributes

Properties

Height Height Height

Gets or sets the image height.

public : unsigned short Height { get; set; }public uint Height { get; set; }Public ReadWrite Property Height As uint
Value
unsigned short uint uint

The height of the image, in pixels.

Attributes

Properties Properties Properties

Gets additional format properties for the image stream.

public : MediaPropertySet Properties { get; }public MediaPropertySet Properties { get; }Public ReadOnly Property Properties As MediaPropertySet
Value
MediaPropertySet MediaPropertySet MediaPropertySet

A property set that contains format properties.

Attributes

Subtype Subtype Subtype

Gets or sets the subtype of the format.

public : PlatForm::String Subtype { get; set; }public string Subtype { get; set; }Public ReadWrite Property Subtype As string
Value
PlatForm::String string string

The subtype.

Attributes

Remarks

The value can be the string representation of a GUID in canonical form, or one of the predefined values listed in the following table.

ValueDescription
"BMP"Bitmap image.
"ICO"ICO image.
"GIF"GIF image.
"JPEG"JPEG image.
"PNG"PNG image.
"TIFF"TIFF image.
"WMP"JPEG-XR or HD Photo image.

Warning

The string values returned by the MediaEncodingSubtypes properties may not use the same letter casing as AudioEncodingProperties.Subtype, VideoEncodingProperties.Subtype, ContainerEncodingProperties.Subtype, and ImageEncodingProperties.Subtype. For this reason, if you compare the values, you should use a case-insensitive comparison or use hardcoded strings that match the casing returned by the encoding properties.

Type Type Type

Gets the format type.

public : PlatForm::String Type { get; }public string Type { get; }Public ReadOnly Property Type As string
Value
PlatForm::String string string

The format type. For image streams, the format type is "Image".

Attributes

Width Width Width

Gets or sets the image width.

public : unsigned short Width { get; set; }public uint Width { get; set; }Public ReadWrite Property Width As uint
Value
unsigned short uint uint

The width of the image, in pixels.

Attributes

Methods

CreateBmp() CreateBmp() CreateBmp()

Creates an instance of ImageEncodingProperties for a BMP image.

public : static ImageEncodingProperties CreateBmp()public static ImageEncodingProperties CreateBmp()Public Static Function CreateBmp() As ImageEncodingProperties
Returns
Attributes

CreateJpeg() CreateJpeg() CreateJpeg()

Creates an instance of ImageEncodingProperties for a JPEG image.

public : static ImageEncodingProperties CreateJpeg()public static ImageEncodingProperties CreateJpeg()Public Static Function CreateJpeg() As ImageEncodingProperties
Returns
Attributes

CreateJpegXR() CreateJpegXR() CreateJpegXR()

Creates an instance of ImageEncodingProperties for a JPEG XR image.

public : static ImageEncodingProperties CreateJpegXR()public static ImageEncodingProperties CreateJpegXR()Public Static Function CreateJpegXR() As ImageEncodingProperties
Returns
Attributes

CreatePng() CreatePng() CreatePng()

Creates an instance of ImageEncodingProperties for a PNG image.

public : static ImageEncodingProperties CreatePng()public static ImageEncodingProperties CreatePng()Public Static Function CreatePng() As ImageEncodingProperties
Returns
Attributes

CreateUncompressed(MediaPixelFormat) CreateUncompressed(MediaPixelFormat) CreateUncompressed(MediaPixelFormat)

Creates an instance of ImageEncodingProperties for an uncompressed image.

public : static ImageEncodingProperties CreateUncompressed(MediaPixelFormat format)public static ImageEncodingProperties CreateUncompressed(MediaPixelFormat format)Public Static Function CreateUncompressed(format As MediaPixelFormat) As ImageEncodingProperties
Parameters
format
MediaPixelFormat MediaPixelFormat MediaPixelFormat

The media pixel format.

Returns
Attributes

See Also