The Windows App SDK experimental channel includes APIs and features in early stages of development. All APIs in the experimental channel are subject to extensive revisions and breaking changes and may be removed from subsequent releases at any time. Experimental features are not supported for use in production environments and apps that use them cannot be published to the Microsoft Store.
Image Description features are not available in mainland China.
Self-contained apps are not supported.
Learn about the Windows App SDK imaging APIs, backed by artificial intelligence (AI), that support the following capabilities:
Image Super Resolution: scaling and sharpening images
Image Description: producing text that describes the image
Image Segmentation: identifying objects within an image
Provide feedback on these APIs and their functionality by creating a new Issue in the Windows App SDK GitHub repo (include Imaging in the title) or by responding to an existing issue.
Microsoft.Graphics.Imaging namespace
Provides APIs for machine learning models that scale and sharpen images.
ImageBuffer class
public sealed class ImageBuffer : System.IDisposable
Represents an uncompressed bitmap for efficient cross-process marshaling.
Remarks
ImageBuffer can be used with AI model APIs such as TextRecognizer that require image data. Typical usage involves creating an ImageBuffer from an existing SoftwareBitmap.
ImageBuffer.Buffer property
public Windows.Storage.Streams.IBuffer Buffer { get; }
Gets the current image buffer.
Property value
The current image buffer.
ImageBuffer.BufferLength property
public uint BufferLength { get; }
Gets the length of the image buffer.
Property value
The length of the image buffer.
ImageBuffer.Close method
// This member is not implemented in C#
Disposes of the object and associated resources.
Remarks
Not implemented in C#.
ImageBuffer.CopyToBuffer(System.Byte[]) method
public void CopyToBuffer (byte[] values);
Copies the current buffer into the provided target buffer.
public Windows.Graphics.Imaging.SoftwareBitmap GetSoftwareBitmapObjectMask (Microsoft.Graphics.Imaging.ImageObjectExtractorHint hint);
Parameters
hint
Returns
ImageObjectExtractor.IsAvailable method
public static bool IsAvailable ();
Returns
ImageObjectExtractor.MakeAvailableAsync method
public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
Returns
ImageObjectExtractorHint class
public sealed class ImageObjectExtractorHint
ImageObjectExtractorHint.ExcludePoints property
public System.Collections.Generic.IReadOnlyList<Windows.Graphics.PointInt32> ExcludePoints { get; }
public ImageObjectExtractorHint (System.Collections.Generic.IList<Windows.Graphics.RectInt32> includeRects, System.Collections.Generic.IList<Windows.Graphics.PointInt32> includePoints, System.Collections.Generic.IList<Windows.Graphics.PointInt32> excludePoints);
Parameters
includeRects
includePoints
excludePoints
ImageObjectExtractorHint.IncludePoints property
public System.Collections.Generic.IReadOnlyList<Windows.Graphics.PointInt32> IncludePoints { get; }
Property value
ImageObjectExtractorHint.IncludeRects property
public System.Collections.Generic.IReadOnlyList<Windows.Graphics.RectInt32> IncludeRects { get; }
Property value
ImageScaler class
public sealed class ImageScaler : System.IDisposable
ImageScaler.Close method
// This member is not implemented in C#
Remarks
Not implemented in C#.
ImageScaler.CreateAsync method
public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageScaler> CreateAsync ();
Returns
ImageScaler.IsAvailable method
public static bool IsAvailable ();
Returns
ImageScaler.MakeAvailableAsync method
public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
public Windows.Graphics.Imaging.SoftwareBitmap ScaleSoftwareBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap, int width, int height);
Parameters
softwareBitmap
width
height
Returns
PixelFormat enum
public enum PixelFormat
Specifies the types of binary layouts for the underlying bitmap data.
Enum fields
Undefined: 0
Binary format is undefined.
Rgb24: 1
The binary format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.
Argb32: 2
The binary format 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components.
Rgba32: 3
The binary format is 32 bits per pixel; 8 bits each are used for the red, green, blue, and alpha components. The color components are stored in red, green, blue, and alpha order.
Bgra32: 4
The binary format is 32 bits per pixel; 8 bits each are used for the blue, green, red, and alpha components. The color components are stored in blue, green, red, and alpha order.
Gray8: 5
The binary format is 16 bits per pixel. The color information specifies 65536 shades of gray.
Discover AI-powered image generators. Learn about image creation tools like Microsoft Image Creator. Understand their potential applications in the workplace and training settings and discover best practices for optimal results. Enhance your skills and transform your creative process with AI-powered image generators.