SkImageInfo Reference

Image Info

Overview

Subtopics

namedescription
Constructorsfunctions that construct SkImageInfo
Member Functionsstatic functions and member methods
Operatorsoperator overloading methods

Constants

namedescription

Alpha Type

Enum SkAlphaType

Describes how to interpret the alpha component of a pixel.

Constants

Example

See Also

incomplete

Color Type

Enum SkColorType

Describes how to interpret the components of a pixel. kN32 SkColorType is an alias for whichever 32 bit Color ARGB format is the "" form for skia‘s blitters. Use this if you don’t have a swizzle preference for 32 bit pixels.

Constants

Constants

Example

See Also

incomplete

Enum SkYUVColorSpace

Describes the color space a YUV pixel.

Constants

Example

See Also

incomplete

Enum SkDestinationSurfaceColorMode

Constants

Example

See Also

incomplete

Struct SkImageInfo

Describe an image's dimensions and pixel type. Used for both src images and render-targets (surfaces).

Operators

namedescription
operator!=(const SkImageInfo& other) constincomplete
operator==(const SkImageInfo& other) constincomplete

Member Functions

namedescription
ByteSizeOverflowedincomplete
Makecreates Image Info from dimensions, Color Type, Alpha Type, Color Space
MakeA8creates Image Info with kAlpha 8 SkColorType, kPremul SkAlphaType
MakeN32creates Image Info with Native Color Type
MakeN32Premulcreates Image Info with Native Color Type, kPremul SkAlphaType
MakeS32creates Image Info with Native Color Type, sRGB Color Space
MakeUnknowncreates Image Info with kUnknown SkColorType, kUnknown SkAlphaType
alphaTypeincomplete
boundsincomplete
bytesPerPixelincomplete
colorSpaceincomplete
colorTypeincomplete
computeByteSizeincomplete
computeMinByteSizeincomplete
computeOffsetincomplete
dimensionsincomplete
flattenincomplete
gammaCloseToSRGBincomplete
heightincomplete
isEmptyincomplete
isOpaqueincomplete
makeAlphaTypecreates Image Info with changed Alpha Type
makeColorSpacecreates Image Info with changed Color Space
makeColorTypecreates Image Info with changed Color Type
makeWHcreates Image Info with changed dimensions
minRowBytesincomplete
minRowBytes64incomplete
refColorSpaceincomplete
resetincomplete
shiftPerPixelincomplete
unflattenincomplete
validRowBytesincomplete
validateincomplete
widthincomplete

Constructors

namedescription
Makecreates Image Info from dimensions, Color Type, Alpha Type, Color Space
MakeA8creates Image Info with kAlpha 8 SkColorType, kPremul SkAlphaType
MakeN32creates Image Info with Native Color Type
MakeN32Premulcreates Image Info with Native Color Type, kPremul SkAlphaType
MakeS32creates Image Info with Native Color Type, sRGB Color Space
MakeUnknowncreates Image Info with kUnknown SkColorType, kUnknown SkAlphaType
SkImageInfo()creates with zero dimensions, kUnknown SkColorType, kUnknown SkAlphaType
makeAlphaTypecreates Image Info with changed Alpha Type
makeColorSpacecreates Image Info with changed Color Space
makeColorTypecreates Image Info with changed Color Type
makeWHcreates Image Info with changed dimensions

SkImageInfo

Return Value

incomplete

Example

See Also

incomplete


Make

Parameters

Return Value

incomplete

Example

See Also

incomplete


MakeN32

Sets colortype to kN32 SkColorType.

Parameters

Return Value

incomplete

Example

See Also

incomplete


MakeS32

Creates Image Info marked as sRGB with kN32 SkColorType swizzle.

Parameters

Return Value

incomplete

Example

See Also

incomplete


MakeN32Premul

Sets colortype to kN32 SkColorType, and the alphatype to premul.

Parameters

Return Value

incomplete

Example

See Also

incomplete


Parameters

Return Value

incomplete

Example

See Also

incomplete


MakeA8

Parameters

Return Value

incomplete

Example

See Also

incomplete


MakeUnknown

Parameters

Return Value

incomplete

Example

See Also

incomplete


Return Value

incomplete

Example

See Also

incomplete


width

Return Value

incomplete

Example

See Also

incomplete


height

Return Value

incomplete

Example

See Also

incomplete


colorType

Return Value

incomplete

Example

See Also

incomplete


alphaType

Return Value

incomplete

Example

See Also

incomplete


colorSpace

Return Value

incomplete

Example

See Also

incomplete


refColorSpace

Return Value

incomplete

Example

See Also

incomplete


isEmpty

Return Value

incomplete

Example

See Also

incomplete


isOpaque

Return Value

incomplete

Example

See Also

incomplete


dimensions

Return Value

incomplete

Example

See Also

incomplete


bounds

Return Value

incomplete

Example

See Also

incomplete


gammaCloseToSRGB

Return Value

incomplete

Example

See Also

incomplete


makeWH

Creates Image Info with the same colortype and alphatype as this info, but with the specified width and height.

Parameters

Return Value

incomplete

Example

See Also

incomplete


makeAlphaType

Parameters

Return Value

incomplete

Example

See Also

incomplete


makeColorType

Parameters

Return Value

incomplete

Example

See Also

incomplete


makeColorSpace

Parameters

Return Value

incomplete

Example

See Also

incomplete


bytesPerPixel

Return Value

incomplete

Example

See Also

incomplete


shiftPerPixel

Return Value

incomplete

Example

See Also

incomplete


minRowBytes64

Return Value

incomplete

Example

See Also

incomplete


minRowBytes

Return Value

incomplete

Example

See Also

incomplete


computeOffset

Parameters

Return Value

incomplete

Example

See Also

incomplete


operator==

Parameters

Return Value

incomplete

Example

See Also

incomplete


operator!=

Parameters

Return Value

incomplete

Example

See Also

incomplete


unflatten

Parameters

Example

See Also

incomplete


flatten

Parameters

Example

See Also

incomplete


computeByteSize

Returns the size (in bytes) of the image buffer that this info needs, given the specified rowBytes. The rowBytes must be >= this->minRowBytes. if (height == 0) { return 0; } else { return (height - 1) * rowBytes + width * bytes_per_pixel.

If the calculation overflows this returns SK MaxSizeT.

Parameters

Return Value

incomplete

Example

See Also

incomplete


computeMinByteSize

Returns the minimum size (in bytes) of the image buffer that this info needs. If the calculation overflows, or if the height is 0, this returns 0.

Return Value

incomplete

Example

See Also

incomplete


ByteSizeOverflowed

Returns true if the result of computeByteSize (or computeMinByteSize) overflowed

Parameters

Return Value

incomplete

Example

See Also

incomplete


validRowBytes

Parameters

Return Value

incomplete

Example

See Also

incomplete


reset

Example

See Also

incomplete


validate

Example

See Also

incomplete