ImageStream ImageStream ImageStream ImageStream Class

Definition

An implementation of IRandomAccessStreamWithContent type used in the Imaging namespace.

public : sealed class ImageStream : IClosable, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentTypepublic sealed class ImageStream : IDisposable, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentTypePublic NotInheritable Class ImageStream Implements IDisposable, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentType// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

CanRead CanRead CanRead CanRead

Indicates if you can read the stream.

public : PlatForm::Boolean CanRead { get; }public bool CanRead { get; }Public ReadOnly Property CanRead As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

Indicates whether or not you can read the stream.

CanWrite CanWrite CanWrite CanWrite

Indicates if you can write to the stream.

public : PlatForm::Boolean CanWrite { get; }public bool CanWrite { get; }Public ReadOnly Property CanWrite As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

Indicates whether or not you can write to the stream.

ContentType ContentType ContentType ContentType

Returns the data format of the stream.

public : PlatForm::String ContentType { get; }public string ContentType { get; }Public ReadOnly Property ContentType As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The data format of the stream.

Position Position Position Position

Gets the byte offset of the stream.

public : ulong Position { get; }public ulong Position { get; }Public ReadOnly Property Position As ulong// You can use this property in JavaScript.
Value
ulong ulong ulong ulong

The number of bytes from the start of the stream.

Size Size Size Size

Gets or sets the size of the random access stream.

public : ulong Size { get; set; }public ulong Size { get; set; }Public ReadWrite Property Size As ulong// You can use this property in JavaScript.
Value
ulong ulong ulong ulong

The size of the stream.

Methods

CloneStream() CloneStream() CloneStream() CloneStream()

Returns the file stream for the ImageStream.

public : IRandomAccessStream CloneStream()public IRandomAccessStream CloneStream()Public Function CloneStream() As IRandomAccessStream// You can use this method in JavaScript.
Returns

Close() Close() Close() Close()

Closes the ImageStream.

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

FlushAsync() FlushAsync() FlushAsync() FlushAsync()

Asynchronously commits the current frame data and flushes all of the data on the image stream.

public : IAsyncOperation<PlatForm::Boolean> FlushAsync()public IAsyncOperation<bool> FlushAsync()Public Function FlushAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Returns

An object that manages the asynchronous flush operation.

GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64)

Returns an input stream at a specified location in a stream.

public : IInputStream GetInputStreamAt(unsigned __int64 position)public IInputStream GetInputStreamAt(UInt64 position)Public Function GetInputStreamAt(position As UInt64) As IInputStream// You can use this method in JavaScript.
Parameters
position
unsigned __int64 UInt64 UInt64 UInt64

The location in the stream at which to begin.

Returns

GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64)

Returns an output stream at a specified location in a stream.

public : IOutputStream GetOutputStreamAt(unsigned __int64 position)public IOutputStream GetOutputStreamAt(UInt64 position)Public Function GetOutputStreamAt(position As UInt64) As IOutputStream// You can use this method in JavaScript.
Parameters
position
unsigned __int64 UInt64 UInt64 UInt64

The location in the output stream at which to begin.

Returns

ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions)

Reads data asynchronously from a sequential stream.

public : IAsyncOperationWithProgress<IBuffer, unsigned int> ReadAsync(IBuffer buffer, unsigned int count, InputStreamOptions options)public IAsyncOperationWithProgress<IBuffer, uint> ReadAsync(IBuffer buffer, UInt32 count, InputStreamOptions options)Public Function ReadAsync(buffer As IBuffer, count As UInt32, options As InputStreamOptions) As IAsyncOperationWithProgress( Of IBuffer, uint )// You can use this method in JavaScript.
Parameters
buffer
IBuffer IBuffer IBuffer IBuffer

The buffer into which the asynchronous read operation stores the data.

count
unsigned int UInt32 UInt32 UInt32

The size of the buffer.

options
InputStreamOptions InputStreamOptions InputStreamOptions InputStreamOptions

The options for the stream to be read.

Returns

Seek(UInt64) Seek(UInt64) Seek(UInt64) Seek(UInt64)

Sets the position of the stream to the specified value.

public : void Seek(unsigned __int64 position)public void Seek(UInt64 position)Public Function Seek(position As UInt64) As void// You can use this method in JavaScript.
Parameters
position
unsigned __int64 UInt64 UInt64 UInt64

The new position of the stream.

WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer)

Writes data asynchronously in a sequential stream.

public : IAsyncOperationWithProgress<unsigned int, unsigned int> WriteAsync(IBuffer buffer)public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)Public Function WriteAsync(buffer As IBuffer) As IAsyncOperationWithProgress( Of uint, uint )// You can use this method in JavaScript.
Parameters
buffer
IBuffer IBuffer IBuffer IBuffer

The buffer into which the asynchronous writer operation writes.

Returns

The byte writer operation.