SKImage.FromPixelCopy Method

Definition

Overloads

FromPixelCopy(SKImageInfo, Byte[], Int32)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, IntPtr, Int32, SKColorTable)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, ReadOnlySpan<Byte>, Int32)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, Stream, Int32)

Creates a new image from a copy of the stream data.

FromPixelCopy(SKImageInfo, SKStream, Int32)

Creates a new image from a copy of the stream data.

FromPixelCopy(SKImageInfo, IntPtr, Int32)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, Stream)

Creates a new image from a copy of the stream data.

FromPixelCopy(SKImageInfo, IntPtr)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, ReadOnlySpan<Byte>)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, Byte[])

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, SKStream)

Creates a new image from a copy of the stream data.

FromPixelCopy(SKPixmap)

Creates a new image from a copy of an in-memory buffer.

FromPixelCopy(SKImageInfo, Byte[], Int32)

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, byte[] pixels, int rowBytes);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
Byte[]

The buffer of image data.

rowBytes
Int32

The specified the number of bytes used per row in the image.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, IntPtr, Int32, SKColorTable)

Warning

This API is now obsolete.

Creates a new image from a copy of an in-memory buffer.

[System.Obsolete("The Index8 color type and color table is no longer supported. Use FromPixelCopy(SKImageInfo, IntPtr, int) instead.")]
public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKColorTable ctable);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
IntPtr

The pointer to the image in memory.

rowBytes
Int32

The specified the number of bytes used per row in the image.

ctable
SKColorTable

The color table to use with the image data.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

Attributes

FromPixelCopy(SKImageInfo, ReadOnlySpan<Byte>, Int32)

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, ReadOnlySpan<byte> pixels, int rowBytes);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
ReadOnlySpan<Byte>

The buffer of image data.

rowBytes
Int32

The specified the number of bytes used per row in the image.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, Stream, Int32)

Creates a new image from a copy of the stream data.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, System.IO.Stream pixels, int rowBytes);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in the stream.

pixels
Stream

The stream of image data.

rowBytes
Int32

The specified the number of bytes used per row in the image.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, SKStream, Int32)

Creates a new image from a copy of the stream data.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, SkiaSharp.SKStream pixels, int rowBytes);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in the stream.

pixels
SKStream

The stream of image data.

rowBytes
Int32

The specified the number of bytes used per row in the image.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, IntPtr, Int32)

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
IntPtr

The pointer to the image in memory.

rowBytes
Int32

The specified the number of bytes used per row in the image.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, Stream)

Creates a new image from a copy of the stream data.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, System.IO.Stream pixels);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in the stream.

pixels
Stream

The stream of image data.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, IntPtr)

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, IntPtr pixels);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
IntPtr

The pointer to the image in memory.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, ReadOnlySpan<Byte>)

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, ReadOnlySpan<byte> pixels);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
ReadOnlySpan<Byte>

The buffer of image data.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, Byte[])

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, byte[] pixels);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in memory.

pixels
Byte[]

The buffer of image data.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKImageInfo, SKStream)

Creates a new image from a copy of the stream data.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKImageInfo info, SkiaSharp.SKStream pixels);

Parameters

info
SKImageInfo

The image information describing the encoding of the image in the stream.

pixels
SKStream

The stream of image data.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

FromPixelCopy(SKPixmap)

Creates a new image from a copy of an in-memory buffer.

public static SkiaSharp.SKImage FromPixelCopy (SkiaSharp.SKPixmap pixmap);

Parameters

pixmap
SKPixmap

The pixmap that contains the image information and buffer location.

Returns

A new image with a copy of the contents of the specified buffer, or null on error.

Applies to