ImageEncodingProperties ImageEncodingProperties ImageEncodingProperties ImageEncodingProperties Class

Definition

Describes the format of an image stream.

public : sealed class ImageEncodingProperties : IImageEncodingProperties, IMediaEncodingProperties
public sealed class ImageEncodingProperties : IImageEncodingProperties, IMediaEncodingProperties
Public NotInheritable Class ImageEncodingProperties Implements IImageEncodingProperties, IMediaEncodingProperties
var imageEncodingProperties = new imageEncodingProperties();
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()
var imageEncodingProperties = new imageEncodingProperties();

Properties

Height Height Height Height

Gets or sets the image height.

public : unsigned int Height { get; set; }
public uint Height { get; set; }
Public ReadWrite Property Height As uint
var uint = imageEncodingProperties.height;
imageEncodingProperties.height = uint;
Value
unsigned int 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
var mediaPropertySet = imageEncodingProperties.properties;
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
var string = imageEncodingProperties.subtype;
imageEncodingProperties.subtype = string;
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
var string = imageEncodingProperties.type;
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 int Width { get; set; }
public uint Width { get; set; }
Public ReadWrite Property Width As uint
var uint = imageEncodingProperties.width;
imageEncodingProperties.width = uint;
Value
unsigned int 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
var imageEncodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createBmp();
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
var imageEncodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createJpeg();
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
var imageEncodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createJpegXR();
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
var imageEncodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createPng();
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
var imageEncodingProperties = Windows.Media.MediaProperties.ImageEncodingProperties.createUncompressed(format);
Parameters
Returns

See Also