ImageBuffer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an uncompressed bitmap for efficient cross-process marshaling.
public ref class ImageBuffer sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Graphics.Imaging.ImageBufferContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ImageBuffer final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Graphics.Imaging.ImageBufferContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ImageBuffer : System.IDisposable
Public NotInheritable Class ImageBuffer
Implements IDisposable
- Inheritance
- Attributes
- Implements
Remarks
This object can be used with AI model APIs such as Microsoft.Windows.Vision.TextRecognizer that require image data. Typical usage involves creating an ImageBuffer from an existing SoftwareBitmap.
Properties
| Buffer |
Gets the current image buffer. |
| PixelFormat |
Gets the pixel format of the image. |
| PixelHeight | |
| PixelWidth | |
| RowStride | |
Methods
| Close() |
Disposes of the object and associated resources. |
| CopyToByteArray(Byte[]) | |
| CopyToSoftwareBitmap() | |
| CreateForBuffer(IBuffer, ImageBufferPixelFormat, Int32, Int32, Int32) | |
| CreateForSoftwareBitmap(SoftwareBitmap) | |
| Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |