ImageDecoderInit Class
The options of an ImageDecoder (https://w3c.github.io/webcodecs/#dictdef-imagedecoderinit).
public sealed class ImageDecoderInitConstructors
| Name | Description |
|---|---|
| ImageDecoderInit() |
ImageDecoderInit()
ImageDecoder.cs- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public ImageDecoderInit()No documentation is available.
Properties
| Name | Description |
|---|---|
| ColorSpaceConversion | Gets whether the colors are converted to sRGB (ColorSpaceConversion.Default) or keep their encoded values. |
| Data | Gets the encoded image: a byte[] or a ReadOnlyMemory<T> of bytes (copied by the constructor), or, from the scripts, a buffer source or a ReadableStream whose chunks are Uint8Array objects. |
| DesiredHeight | Gets the height the decoded frames are scaled to (with ImageDecoderInit.DesiredWidth). |
| DesiredWidth | Gets the width the decoded frames are scaled to (with ImageDecoderInit.DesiredHeight). |
| PreferAnimation | Gets whether an animated track is selected by default when the image has several tracks. |
| Type | Gets the MIME type of the image (e.g. image/png). |
ColorSpaceConversion
ImageDecoder.csGets whether the colors are converted to sRGB (ColorSpaceConversion.Default) or keep their encoded values.
public ColorSpaceConversion ColorSpaceConversion { get; init; }Data
ImageDecoder.csGets the encoded image: a byte[] or a ReadOnlyMemory<T> of bytes (copied by the constructor), or, from the scripts, a buffer source or a ReadableStream whose chunks are Uint8Array objects.
public required object? Data { get; init; }DesiredHeight
ImageDecoder.csGets the height the decoded frames are scaled to (with ImageDecoderInit.DesiredWidth).
public uint? DesiredHeight { get; init; }DesiredWidth
ImageDecoder.csGets the width the decoded frames are scaled to (with ImageDecoderInit.DesiredHeight).
public uint? DesiredWidth { get; init; }PreferAnimation
ImageDecoder.csGets whether an animated track is selected by default when the image has several tracks.
public bool? PreferAnimation { get; init; }Type
ImageDecoder.csGets the MIME type of the image (e.g. image/png).
public required string Type { get; init; }