Upravit

Sdílet prostřednictvím


SKPixmap Class

Definition

Pairs SKImageInfo with actual pixels and rowbytes.

public class SKPixmap : SkiaSharp.SKObject
Inheritance

Remarks

This class does not try to manage the lifetime of the pixel memory (nor the color table if provided).

Constructors

SKPixmap()

Creates an empty instance of SKPixmap.

SKPixmap(SKImageInfo, IntPtr, Int32, SKColorTable)
Obsolete.

Creates an instance of SKPixmap.

SKPixmap(SKImageInfo, IntPtr, Int32)

Creates an instance of SKPixmap.

SKPixmap(SKImageInfo, IntPtr)

Creates an instance of SKPixmap.

Properties

AlphaType

Gets the alpha type.

BytesPerPixel

Gets the number of bytes per pixel.

BytesSize

Gets the total number of bytes needed to store the pixel data.

ColorSpace

Gets the color space.

ColorTable
Obsolete.

Gets the color table.

ColorType

Gets the color type.

Handle

Gets or sets the handle to the underlying native object.

(Inherited from SKObject)
Height

Gets the image height.

IgnorePublicDispose

Gets or sets a value indicating whether the call the public Dispose() should be no-op.

(Inherited from SKNativeObject)
Info

Gets the image info.

IsDisposed

Gets or sets a value indicating whether the object has already been disposed.

(Inherited from SKNativeObject)
OwnsHandle

Gets a value indicating whether this object should destroy the underlying native object.

(Inherited from SKObject)
Rect

Gets a rectangle with the current width and height.

RowBytes

Gets the number of bytes per row.

Size

Gets the current size of the pixmap.

Width

Gets the image width.

Methods

Dispose()

Releases all resources used by this SKNativeObject.

(Inherited from SKNativeObject)
Dispose(Boolean)

Releases the unmanaged resources used by the SKPixmap and optionally releases the managed resources.

DisposeInternal()

Triggers a dispose, ignoring the value of IgnorePublicDispose.

(Inherited from SKNativeObject)
DisposeManaged()
DisposeManaged()

Implemented by derived SKObject types to destroy any managed objects.

(Inherited from SKObject)
DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

(Inherited from SKObject)
DisposeUnownedManaged() (Inherited from SKObject)
Encode(SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

Encode(SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

Encode(SKPngEncoderOptions)

Encodes the pixmap as a PNG.

Encode(SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

Encode(SKWStream, SKBitmap, SKEncodedImageFormat, Int32)
Obsolete.

Encodes the bitmap using the specified format.

Encode(SKWStream, SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

Encode(SKWStream, SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

Encode(SKWStream, SKPixmap, SKEncodedImageFormat, Int32)
Obsolete.

Encodes the pixmap using the specified format.

Encode(SKWStream, SKPixmap, SKJpegEncoderOptions)
Obsolete.

Encodes the pixmap as a JPEG.

Encode(SKWStream, SKPixmap, SKPngEncoderOptions)
Obsolete.

Encodes the pixmap as a PNG.

Encode(SKWStream, SKPixmap, SKWebpEncoderOptions)
Obsolete.

Encodes the pixmap as a WEBP.

Encode(SKWStream, SKPngEncoderOptions)

Encodes the pixmap as a PNG.

Encode(SKWStream, SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

Encode(Stream, SKEncodedImageFormat, Int32)
Encode(Stream, SKJpegEncoderOptions)
Encode(Stream, SKPngEncoderOptions)
Encode(Stream, SKWebpEncoderOptions)
Erase(SKColor, SKRectI)

Fill the entire pixmap with the specified color.

Erase(SKColor)

Fill the entire pixmap with the specified color.

Erase(SKColorF, SKColorSpace, SKRectI)
Erase(SKColorF, SKRectI)
Erase(SKColorF)
ExtractSubset(SKPixmap, SKRectI)

Creates a new SKPixmap which is a subset of this pixmap.

ExtractSubset(SKRectI)

Creates a new SKPixmap which is a subset of this pixmap.

GetPixelColor(Int32, Int32)

Returns the color of the pixel at the specified coordinates.

GetPixels()

Returns the memory address of the pixels.

GetPixels(Int32, Int32)

Returns the memory address of the pixels at (x, y).

GetPixelSpan()

Returns a span that wraps the pixel data.

GetPixelSpan<T>()
ReadPixels(SKImageInfo, IntPtr, Int32, Int32, Int32, SKTransferFunctionBehavior)
Obsolete.

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)

Copies the pixels from the image into the specified buffer.

ReadPixels(SKPixmap, Int32, Int32)

Copies the pixels from the image into the specified pixmap.

ReadPixels(SKPixmap)

Copies the pixels from the image into the specified pixmap.

Reset()

Reset the pixmap to an empty pixmap.

Reset(SKImageInfo, IntPtr, Int32, SKColorTable)
Obsolete.

Resets the pixmap to the specified pixels.

Reset(SKImageInfo, IntPtr, Int32)

Resets the pixmap to the specified pixels.

Resize(SKPixmap, SKPixmap, SKBitmapResizeMethod)
Obsolete.

Resize the specified pixmap using the specified method.

ScalePixels(SKPixmap, SKFilterQuality)

Copies this pixmap to the destination, scaling the pixels to fit the destination size and converting the pixels to match the color type and alpha type.

WithAlphaType(SKAlphaType)

Creates a new SKPixmap with the same properties as this SKPixmap, but with the specified transparency type.

WithColorSpace(SKColorSpace)

Creates a new SKPixmap with the same properties as this SKPixmap, but with the specified color space.

WithColorType(SKColorType)

Creates a new SKPixmap with the same properties as this SKPixmap, but with the specified color type.

Applies to