ImageEncodingProperties ImageEncodingProperties ImageEncodingProperties ImageEncodingProperties Class

Describes the format of an image stream.

Syntax

Declaration

public sealed class ImageEncodingPropertiespublic sealed class ImageEncodingPropertiesPublic NotInheritable Class ImageEncodingProperties

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 summary

Creates a new instance of the ImageEncodingProperties class.

Properties summary

Gets or sets the image height.

Gets additional format properties for the image stream.

Gets or sets the subtype of the format.

Gets the format type.

Gets or sets the image width.

Methods summary

Creates an instance of ImageEncodingProperties for a BMP image.

Creates an instance of ImageEncodingProperties for a JPEG image.

Creates an instance of ImageEncodingProperties for a JPEG XR image.

Creates an instance of ImageEncodingProperties for a PNG image.

Creates an instance of ImageEncodingProperties for an uncompressed image.

Constructors

  • ImageEncodingProperties()
    ImageEncodingProperties()
    ImageEncodingProperties()
    ImageEncodingProperties()

    Creates a new instance of the ImageEncodingProperties class.

    public ImageEncodingProperties()public ImageEncodingProperties()Public Function ImageEncodingProperties() As

Properties

  • Height
    Height
    Height
    Height

    Gets or sets the image height.

    public uint Height { get; set; }public uint Height { get; set; }Public ReadWrite Property Height As uint

    Property Value

    • uint
      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

    Property Value

  • Subtype
    Subtype
    Subtype
    Subtype

    Gets or sets the subtype of the format.

    public string Subtype { get; set; }public string Subtype { get; set; }Public ReadWrite Property Subtype As string

    Property Value

    • 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 Subtype, Subtype, Subtype, and 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 string Type { get; }public string Type { get; }Public ReadOnly Property Type As string

    Property Value

    • 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 uint Width { get; set; }public uint Width { get; set; }Public ReadWrite Property Width As uint

    Property Value

    • uint
      uint
      uint
      uint

      The width of the image, in pixels.

Methods

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Media.MediaProperties.dll