Image​Encoding​Properties 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// You can use this class in JavaScript.
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() ImageEncodingProperties()

Creates a new instance of the ImageEncodingProperties class.

public : ImageEncodingProperties()public ImageEncodingProperties()Public Sub New()// You can use this method in JavaScript.

Properties

Height 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// You can use this property in JavaScript.
Value
unsigned short uint uint uint

The height of the image, in pixels.

Properties 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// You can use this property in JavaScript.
Value
MediaPropertySet MediaPropertySet MediaPropertySet MediaPropertySet

A property set that contains format properties.

Subtype 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// You can use this property in JavaScript.
Value
PlatForm::String string string string

The subtype.

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 Type

Gets the format type.

public : PlatForm::String Type { get; }public string Type { get; }Public ReadOnly Property Type As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

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

Width 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// You can use this property in JavaScript.
Value
unsigned short uint uint uint

The width of the image, in pixels.

Methods

CreateBmp() 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// You can use this method in JavaScript.
Returns

CreateJpeg() 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// You can use this method in JavaScript.
Returns

CreateJpegXR() 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// You can use this method in JavaScript.
Returns

CreatePng() 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// You can use this method in JavaScript.
Returns

CreateUncompressed(MediaPixelFormat) 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// You can use this method in JavaScript.
Parameters
Returns

See Also