SKImage.ReadPixels Method

Definition

Overloads

ReadPixels(SKPixmap, Int32, Int32)

Copies the pixels from the image into the specified buffer.

ReadPixels(SKPixmap, Int32, Int32, SKImageCachingHint)

Copies the pixels from the image into the specified buffer.

ReadPixels(SKImageInfo, IntPtr, Int32, Int32, Int32)

Copies the pixels from the image into the specified buffer.

ReadPixels(SKImageInfo, IntPtr, Int32, Int32, Int32, SKImageCachingHint)

Copies the pixels from the image into the specified buffer.

ReadPixels(SKPixmap, Int32, Int32)

Copies the pixels from the image into the specified buffer.

public bool ReadPixels (SkiaSharp.SKPixmap pixmap, int srcX, int srcY);

Parameters

pixmap
SKPixmap

The pixmap to read the pixel data into.

srcX
Int32

The source x-coordinate to start reading from.

srcY
Int32

The source y-coordinate to start reading from.

Returns

Returns true if the pixels were read, or false if there was an error.

Remarks

This method may return false if the source rectangle [srcX, srcY, dst.Info.Width, dst.Info.Height] does not intersect the image, or if the color type/alpha type could not be converted to the destination types.

ReadPixels(SKPixmap, Int32, Int32, SKImageCachingHint)

Copies the pixels from the image into the specified buffer.

public bool ReadPixels (SkiaSharp.SKPixmap pixmap, int srcX, int srcY, SkiaSharp.SKImageCachingHint cachingHint);

Parameters

pixmap
SKPixmap

The pixmap to read the pixel data into.

srcX
Int32

The source x-coordinate to start reading from.

srcY
Int32

The source y-coordinate to start reading from.

cachingHint
SKImageCachingHint

Whether or not to cache intermediate results.

Returns

Returns true if the pixels were read, or false if there was an error.

Remarks

This method may return false if the source rectangle [srcX, srcY, dst.Info.Width, dst.Info.Height] does not intersect the image, or if the color type/alpha type could not be converted to the destination types.

ReadPixels(SKImageInfo, IntPtr, Int32, Int32, Int32)

Copies the pixels from the image into the specified buffer.

public bool ReadPixels (SkiaSharp.SKImageInfo dstInfo, IntPtr dstPixels, int dstRowBytes, int srcX, int srcY);

Parameters

dstInfo
SKImageInfo

The image information describing the destination pixel buffer.

dstPixels
IntPtr

The pixel buffer to read the pixel data into.

dstRowBytes
Int32

The number of bytes in each row of in the destination buffer.

srcX
Int32

The source x-coordinate to start reading from.

srcY
Int32

The source y-coordinate to start reading from.

Returns

Returns true if the pixels were read, or false if there was an error.

Remarks

This method may return false if the source rectangle [srcX, srcY, dstInfo.Width, dstInfo.Height] does not intersect the image, or if the color type/alpha type could not be converted to the destination types.

ReadPixels(SKImageInfo, IntPtr, Int32, Int32, Int32, SKImageCachingHint)

Copies the pixels from the image into the specified buffer.

public bool ReadPixels (SkiaSharp.SKImageInfo dstInfo, IntPtr dstPixels, int dstRowBytes, int srcX, int srcY, SkiaSharp.SKImageCachingHint cachingHint);

Parameters

dstInfo
SKImageInfo

The image information describing the destination pixel buffer.

dstPixels
IntPtr

The pixel buffer to read the pixel data into.

dstRowBytes
Int32

The number of bytes in each row of in the destination buffer.

srcX
Int32

The source x-coordinate to start reading from.

srcY
Int32

The source y-coordinate to start reading from.

cachingHint
SKImageCachingHint

Whether or not to cache intermediate results.

Returns

Returns true if the pixels were read, or false if there was an error.

Remarks

This method may return false if the source rectangle [srcX, srcY, dstInfo.Width, dstInfo.Height] does not intersect the image, or if the color type/alpha type could not be converted to the destination types.

Applies to