<ahref="#SkImage">SkImage</a> is an abstraction for drawing a rectangle of pixels, though the
particular type of image could be actually storing its data on the <ahref="undocumented#GPU">GPU</a>, or
as drawing commands (picture or <ahref="undocumented#PDF">PDF</a> or otherwise), ready to be played back
into another canvas.
The content of <ahref="#SkImage">SkImage</a> is always immutable, though the actual storage may
change, if for example that image can be re-created via encoded data or
other means.
<ahref="#SkImage">SkImage</a> always has a non-zero <ahref="#SkImage_dimensions">dimensions</a>. If there is a request to create a new
image, either directly or via <ahref="SkSurface_Reference#SkSurface">SkSurface</a>, and either of the requested <ahref="#SkImage_dimensions">dimensions</a>
are zero, then nullptr will be returned.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| topics | description |
| --- | --- |
## <a name="Member_Functions"></a> Member Functions
| <ahref="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | Creates <ahref="undocumented#GPU">GPU</a> texture from <ahref="#Image">Image</a>. |
| <ahref="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | Creates <ahref="#Image">Image</a> from encoded data, and uploads to <ahref="undocumented#GPU">GPU</a>. |
| <ahref="#SkImage_MakeFromAHardwareBuffer">MakeFromAHardwareBuffer</a> | Creates <ahref="#Image">Image</a> from <ahref="undocumented#Android">Android</a> hardware buffer. |
| <ahref="#SkImage_MakeFromBitmap">MakeFromBitmap</a> | Creates <ahref="#Image">Image</a> from <ahref="SkBitmap_Reference#Bitmap">Bitmap</a>, sharing or copying pixels. |
| <ahref="#SkImage_MakeFromEncoded">MakeFromEncoded</a> | Creates <ahref="#Image">Image</a> from encoded data. |
| <ahref="#SkImage_MakeFromGenerator">MakeFromGenerator</a> | Creates <ahref="#Image">Image</a> from a stream of data. |
| <ahref="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a> | Creates <ahref="#Image">Image</a> from <ahref="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in two planes. |
| <ahref="#SkImage_MakeFromPicture">MakeFromPicture</a> | Creates <ahref="#Image">Image</a> from <ahref="undocumented#Picture">Picture</a>. |
| <ahref="#SkImage_MakeFromRaster">MakeFromRaster</a> | Creates <ahref="#Image">Image</a> from <ahref="SkPixmap_Reference#Pixmap">Pixmap</a>, with release. |
| <ahref="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> | Creates <ahref="#Image">Image</a> from <ahref="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in three planes. |
| <ahref="#SkImage_MakeRasterCopy">MakeRasterCopy</a> | Creates <ahref="#Image">Image</a> from <ahref="SkPixmap_Reference#Pixmap">Pixmap</a> and copied pixels. |
| <ahref="#SkImage_MakeRasterData">MakeRasterData</a> | Creates <ahref="#Image">Image</a> from <ahref="#Info">Image Info</a> and shared pixels. |
| <ahref="#SkImage_isAlphaOnly">isAlphaOnly</a> | Returns if pixels represent a transparency mask. |
| <ahref="#SkImage_isLazyGenerated">isLazyGenerated</a> | Returns if <ahref="#Image">Image</a> is created as needed. |
| <ahref="#SkImage_isOpaque">isOpaque</a> | Returns if <ahref="#Alpha_Type">Alpha Type</a> is <ahref="undocumented#SkAlphaType">kOpaque SkAlphaType</a>. |
| <ahref="#SkImage_isTextureBacked">isTextureBacked</a> | Returns if <ahref="#Image">Image</a> was created from <ahref="undocumented#GPU">GPU</a> texture. |
| <ahref="#SkImage_isValid">isValid</a> | Returns if <ahref="#Image">Image</a> can draw to <ahref="undocumented#Raster_Surface">Raster Surface</a> or <ahref="undocumented#GPU_Context">GPU Context</a>. |
| <ahref="#SkImage_makeNonTextureImage">makeNonTextureImage</a> | Creates <ahref="undocumented#Raster_Image">Raster Image</a> if possible. |
| <ahref="#SkImage_makeShader">makeShader</a> | Creates <ahref="undocumented#Shader">Shader</a>, <ahref="SkPaint_Reference#Paint">Paint</a> element that can tile <ahref="#Image">Image</a>. |
| <ahref="#SkImage_makeSubset">makeSubset</a> | Creates <ahref="#Image">Image</a> containing part of original. |
Creates <ahref="#Image">Image</a> from <ahref="SkPixmap_Reference#Pixmap">Pixmap</a> and copy of pixels. Since pixels are copied, <ahref="SkPixmap_Reference#Pixmap">Pixmap</a>
pixels may be modified or deleted without affecting <ahref="#Image">Image</a>.
<ahref="#Image">Image</a> is returned if <ahref="SkPixmap_Reference#Pixmap">Pixmap</a> is valid. Valid <ahref="SkPixmap_Reference#Pixmap">Pixmap</a> parameters include:
<ahref="#SkImage_dimensions">dimensions</a> are greater than zero;
each dimension fits in 29 bits;
<ahref="#Color_Type">Color Type</a> and <ahref="#Alpha_Type">Alpha Type</a> are valid, and <ahref="#Color_Type">Color Type</a> is not <ahref="undocumented#SkColorType">kUnknown SkColorType</a>;
row bytes are large enough to hold one row of pixels;
<div><fiddle-embedname="513afec5795a9504ebf6af5373d16b6b"><div>Draw a five by five bitmap, and draw a copy in an <ahref="#Image">Image</a>. Editing the <ahref="#SkImage_MakeRasterCopy_pixmap">pixmap</a>
alters the bitmap draw, but does not alter the <ahref="#Image">Image</a> draw since the <ahref="#Image">Image</a>
contains a copy of the pixels.</div></fiddle-embed></div>
Creates <ahref="#Image">Image</a> from <ahref="#Info">Image Info</a>, sharing <ahref="#SkImage_MakeRasterData_pixels">pixels</a>.
<ahref="#Image">Image</a> is returned if <ahref="#Info">Image Info</a> is valid. Valid <ahref="#Info">Image Info</a> parameters include:
<ahref="#SkImage_dimensions">dimensions</a> are greater than zero;
each dimension fits in 29 bits;
<ahref="#Color_Type">Color Type</a> and <ahref="#Alpha_Type">Alpha Type</a> are valid, and <ahref="#Color_Type">Color Type</a> is not <ahref="undocumented#SkColorType">kUnknown SkColorType</a>;
<ahref="#SkImage_MakeRasterData_rowBytes">rowBytes</a> are large enough to hold one row of <ahref="#SkImage_MakeRasterData_pixels">pixels</a>;
<ahref="#SkImage_MakeRasterData_pixels">pixels</a> is not nullptr, and contains enough data for <ahref="#Image">Image</a>.
Creates <ahref="#Image">Image</a> from <ahref="#SkImage_MakeFromRaster_pixmap">pixmap</a>, sharing <ahref="#SkImage_MakeFromRaster_pixmap">pixmap</a> pixels. Pixels must remain valid and
unchanged until <ahref="#SkImage_MakeFromRaster_rasterReleaseProc">rasterReleaseProc</a> is called. <ahref="#SkImage_MakeFromRaster_rasterReleaseProc">rasterReleaseProc</a> is passed
<ahref="#SkImage_MakeFromRaster_releaseContext">releaseContext</a> when <ahref="#Image">Image</a> is deleted or no longer refers to <ahref="#SkImage_MakeFromRaster_pixmap">pixmap</a> pixels.
<ahref="#Image">Image</a> is returned if <ahref="#SkImage_MakeFromRaster_pixmap">pixmap</a> is valid. Valid <ahref="SkPixmap_Reference#Pixmap">Pixmap</a> parameters include:
<ahref="#SkImage_dimensions">dimensions</a> are greater than zero;
each dimension fits in 29 bits;
<ahref="#Color_Type">Color Type</a> and <ahref="#Alpha_Type">Alpha Type</a> are valid, and <ahref="#Color_Type">Color Type</a> is not <ahref="undocumented#SkColorType">kUnknown SkColorType</a>;
row bytes are large enough to hold one row of pixels;
Creates <ahref="#Image">Image</a> from <ahref="#SkImage_MakeFromBitmap_bitmap">bitmap</a>, sharing or copying <ahref="#SkImage_MakeFromBitmap_bitmap">bitmap</a> pixels. If the <ahref="#SkImage_MakeFromBitmap_bitmap">bitmap</a>
is marked immutable, and its pixel memory is shareable, it may be shared
instead of copied.
<ahref="#Image">Image</a> is returned if <ahref="#SkImage_MakeFromBitmap_bitmap">bitmap</a> is valid. Valid <ahref="SkBitmap_Reference#Bitmap">Bitmap</a> parameters include:
<ahref="#SkImage_dimensions">dimensions</a> are greater than zero;
each dimension fits in 29 bits;
<ahref="#Color_Type">Color Type</a> and <ahref="#Alpha_Type">Alpha Type</a> are valid, and <ahref="#Color_Type">Color Type</a> is not <ahref="undocumented#SkColorType">kUnknown SkColorType</a>;
row bytes are large enough to hold one row of pixels;
Creates <ahref="#Image">Image</a> based from <ahref="#SkImage_MakeFromGenerator_imageGenerator">imageGenerator</a>.
Takes ownership of <ahref="#SkImage_MakeFromGenerator_imageGenerator">imageGenerator</a>; it may not be used elsewhere.
If <ahref="#SkImage_MakeFromGenerator_subset">subset</a> is not nullptr, it must be contained within <ahref="#SkImage_MakeFromGenerator_imageGenerator">imageGenerator</a> data <ahref="#SkImage_bounds">bounds</a>.
<ahref="#Image">Image</a> is returned if generator data is valid. Valid data parameters vary
by type of data and platform.
<ahref="#SkImage_MakeFromGenerator_imageGenerator">imageGenerator</a> may wrap <ahref="undocumented#Picture">Picture</a> data, codec data, or custom data.
Creates <ahref="#Image">Image</a> from <ahref="#SkImage_MakeFromEncoded_encoded">encoded</a> data.
If a <ahref="#SkImage_MakeFromEncoded_subset">subset</a> is not nullptr, it must be contained within <ahref="#SkImage_MakeFromEncoded_encoded">encoded</a> data <ahref="#SkImage_bounds">bounds</a>.
<ahref="#Image">Image</a> is returned if format of the <ahref="#SkImage_MakeFromEncoded_encoded">encoded</a> data is recognized and supported.
Creates <ahref="#Image">Image</a> from <ahref="undocumented#GPU">GPU</a> texture associated with <ahref="#SkImage_MakeFromTexture_context">context</a>. Caller is responsible for
managing the lifetime of <ahref="undocumented#GPU">GPU</a> texture.
<ahref="#Image">Image</a> is returned if format of <ahref="#SkImage_MakeFromTexture_backendTexture">backendTexture</a> is recognized and supported.
Recognized formats vary by <ahref="undocumented#GPU">GPU</a> back-end.
Creates <ahref="#Image">Image</a> from <ahref="undocumented#GPU">GPU</a> texture associated with <ahref="#SkImage_MakeFromTexture_2_context">context</a>. <ahref="undocumented#GPU">GPU</a> texture must stay
valid and unchanged until <ahref="#SkImage_MakeFromTexture_2_textureReleaseProc">textureReleaseProc</a> is called. <ahref="#SkImage_MakeFromTexture_2_textureReleaseProc">textureReleaseProc</a> is
passed <ahref="#SkImage_MakeFromTexture_2_releaseContext">releaseContext</a> when <ahref="#Image">Image</a> is deleted or no longer refers to texture.
<ahref="#Image">Image</a> is returned if format of <ahref="#SkImage_MakeFromTexture_2_backendTexture">backendTexture</a> is recognized and supported.
Recognized formats vary by <ahref="undocumented#GPU">GPU</a> back-end.
Creates <ahref="#Image">Image</a> from encoded <ahref="#SkImage_MakeCrossContextFromEncoded_data">data</a>. <ahref="#Image">Image</a> is uploaded to <ahref="undocumented#GPU">GPU</a> back-end using <ahref="#SkImage_MakeCrossContextFromEncoded_context">context</a>.
Created <ahref="#Image">Image</a> is available to other <ahref="undocumented#GPU">GPU</a> contexts, and is available across thread
boundaries. All contexts must be in the same <ahref="undocumented#GPU_Share_Group">GPU Share Group</a>, or otherwise
share resources.
When <ahref="#Image">Image</a> is no longer referenced, <ahref="#SkImage_MakeCrossContextFromEncoded_context">context</a> releases texture memory
<ahref="undocumented#Texture">Texture</a> decoded from <ahref="#SkImage_MakeCrossContextFromEncoded_data">data</a> is uploaded to match <ahref="SkSurface_Reference#Surface">Surface</a> created with
<ahref="#SkImage_MakeCrossContextFromEncoded_dstColorSpace">dstColorSpace</a>. <ahref="undocumented#Color_Space">Color Space</a> of <ahref="#Image">Image</a> is determined by encoded <ahref="#SkImage_MakeCrossContextFromEncoded_data">data</a>.
<ahref="#Image">Image</a> is returned if format of <ahref="#SkImage_MakeCrossContextFromEncoded_data">data</a> is recognized and supported, and if <ahref="#SkImage_MakeCrossContextFromEncoded_context">context</a>
supports moving resources. Recognized formats vary by platform and <ahref="undocumented#GPU">GPU</a> back-end.
Creates <ahref="#Image">Image</a> from <ahref="#SkImage_MakeCrossContextFromPixmap_pixmap">pixmap</a>. <ahref="#Image">Image</a> is uploaded to <ahref="undocumented#GPU">GPU</a> back-end using <ahref="#SkImage_MakeCrossContextFromPixmap_context">context</a>.
Created <ahref="#Image">Image</a> is available to other <ahref="undocumented#GPU">GPU</a> contexts, and is available across thread
boundaries. All contexts must be in the same <ahref="undocumented#GPU_Share_Group">GPU Share Group</a>, or otherwise
share resources.
When <ahref="#Image">Image</a> is no longer referenced, <ahref="#SkImage_MakeCrossContextFromPixmap_context">context</a> releases texture memory
asynchronously.
<ahref="undocumented#Texture">Texture</a> created from <ahref="#SkImage_MakeCrossContextFromPixmap_pixmap">pixmap</a> is uploaded to match <ahref="SkSurface_Reference#Surface">Surface</a> created with
<ahref="#SkImage_MakeCrossContextFromPixmap_dstColorSpace">dstColorSpace</a>. <ahref="undocumented#Color_Space">Color Space</a> of <ahref="#Image">Image</a> is determined by <ahref="#SkImage_MakeCrossContextFromPixmap_pixmap">pixmap</a>.<ahref="#SkImage_colorSpace">colorSpace</a>.
<ahref="#Image">Image</a> is returned referring to <ahref="undocumented#GPU">GPU</a> back-end if format of data is recognized and
supported, and if <ahref="#SkImage_MakeCrossContextFromPixmap_context">context</a> supports moving resources. Otherwise, <ahref="#SkImage_MakeCrossContextFromPixmap_pixmap">pixmap</a> pixel
data is copied and <ahref="#Image">Image</a> as returned in raster format if possible; nullptr may
be returned. Recognized <ahref="undocumented#GPU">GPU</a> formats vary by platform and <ahref="undocumented#GPU">GPU</a> back-end.
Creates <ahref="#Image">Image</a> from <ahref="#SkImage_MakeFromAdoptedTexture_backendTexture">backendTexture</a> associated with <ahref="#SkImage_MakeFromAdoptedTexture_context">context</a>. <ahref="#SkImage_MakeFromAdoptedTexture_backendTexture">backendTexture</a> and
returned <ahref="#Image">Image</a> are managed internally, and are released when no longer needed.
<ahref="#Image">Image</a> is returned if format of <ahref="#SkImage_MakeFromAdoptedTexture_backendTexture">backendTexture</a> is recognized and supported.
Recognized formats vary by <ahref="undocumented#GPU">GPU</a> back-end.
Create a new image from the specified <ahref="#SkImage_MakeFromPicture_picture">picture</a>.
On creation of the <ahref="#SkImage">SkImage</a>, snap the <ahref="undocumented#SkPicture">SkPicture</a> to a particular <ahref="#SkImage_BitDepth">BitDepth</a> and <ahref="undocumented#SkColorSpace">SkColorSpace</a>.
Create a new image from the an <ahref="undocumented#Android">Android</a> hardware buffer.
The new image takes a reference on the buffer.
Only available on <ahref="undocumented#Android">Android</a>, when __<ahref="undocumented#ANDROID_API__">ANDROID API </a> is defined to be 26 or greater.
Returns <ahref="undocumented#Color_Space">Color Space</a>, the range of colors, associated with <ahref="#Image">Image</a>. The
reference count of <ahref="undocumented#Color_Space">Color Space</a> is unchanged. The returned <ahref="undocumented#Color_Space">Color Space</a> is
immutable.
<ahref="undocumented#Color_Space">Color Space</a> returned was a parameter to an <ahref="#Image">Image</a> constructor,
or was parsed from encoded data. <ahref="undocumented#Color_Space">Color Space</a> may be ignored when
drawing <ahref="#Image">Image</a>, and when drawing into <ahref="SkSurface_Reference#Surface">Surface</a> constructed with <ahref="undocumented#Color_Space">Color Space</a>.
Returns true if <ahref="#Image">Image</a> can be drawn. If <ahref="#SkImage_isValid_context">context</a>
is nullptr, tests if <ahref="#Image">Image</a> draws on <ahref="undocumented#Raster_Surface">Raster Surface</a>; Otherwise, tests if <ahref="#Image">Image</a>
draws on <ahref="undocumented#GPU_Surface">GPU Surface</a> associated with <ahref="#SkImage_isValid_context">context</a>.
<ahref="undocumented#Texture">Texture</a>-backed images may become invalid if their underlying <ahref="undocumented#GrContext">GrContext</a> is abandoned. Some
generator-backed images may be invalid for <ahref="undocumented#CPU">CPU</a> and/or <ahref="undocumented#GPU">GPU</a>.
Retrieves the back-end <ahref="undocumented#API">API</a> handle of texture. If <ahref="#SkImage_getTextureHandle_flushPendingGrContextIO">flushPendingGrContextIO</a> is true,
Hints to image calls where the system might cache computed intermediates (e.g. the results
of decoding or a read-back from the <ahref="undocumented#GPU">GPU</a>. Passing <ahref="#SkImage_kAllow_CachingHint">kAllow CachingHint</a> signals that the system's default
behavior is fine. Passing <ahref="#SkImage_kDisallow_CachingHint">kDisallow CachingHint</a> signals that caching should be avoided.
Copy the pixels from the image into the specified buffer (<ahref="#SkImage_readPixels_dstPixels">dstPixels</a> + <ahref="#SkImage_readPixels_dstRowBytes">dstRowBytes</a>),
converting them into the requested format (<ahref="#SkImage_readPixels_dstInfo">dstInfo</a>). The image pixels are read
starting at the specified (<ahref="#SkImage_readPixels_srcX">srcX</a>, <ahref="#SkImage_readPixels_srcY">srcY</a>) location.
<ahref="#SkImage_readPixels_dstInfo">dstInfo</a> and (<ahref="#SkImage_readPixels_srcX">srcX</a>, <ahref="#SkImage_readPixels_srcY">srcY</a>) offset specifies a source rectangle:
The source rectangle is intersected with the <ahref="#SkImage_bounds">bounds</a> of the image. If this intersection is not empty,
then we have two sets of pixels (of equal size). Replace <ahref="#SkImage_readPixels_dstPixels">dstPixels</a> with the
corresponding <ahref="#Image">Image</a> pixels, performing any <ahref="#Color_Type">Color Type</a>/<ahref="#Alpha_Type">Alpha Type</a> transformations needed
(in the case where <ahref="#Image">Image</a> and <ahref="#SkImage_readPixels_dstInfo">dstInfo</a> have different <ahref="#Color_Type">Color Types</a> or <ahref="#Alpha_Type">Alpha Types</a>).
This call can fail, returning false, for several reasons:
if source rectangle does not intersect the image <ahref="#SkImage_bounds">bounds</a>;
if the requested <ahref="#Color_Type">Color Type</a>/<ahref="#Alpha_Type">Alpha Type</a> cannot be converted from the image's types.
Copies <ahref="#Image">Image</a> pixels into <ahref="#SkImage_scalePixels_dst">dst</a>, converting to <ahref="#SkImage_scalePixels_dst">dst</a><ahref="#Color_Type">Color Type</a> and <ahref="#Alpha_Type">Alpha Type</a>.
If the conversion cannot be performed, false is returned.
If <ahref="#SkImage_scalePixels_dst">dst</a><ahref="#SkImage_dimensions">dimensions</a> differ from <ahref="#Image">Image</a><ahref="#SkImage_dimensions">dimensions</a>, <ahref="#Image">Image</a> is scaled, applying
Encodes <ahref="#Image">Image</a> and returns result as <ahref="undocumented#SkData">SkData</a>. Will reuse existing encoded data
if present, as returned by <ahref="#SkImage_refEncodedData">refEncodedData</a>. <ahref="#SkImage_encodeToData_2_pixelSerializer">pixelSerializer</a> validates existing
encoded data, and encodes <ahref="#Image">Image</a> when existing encoded data is missing or
invalid.
Passing nullptr for <ahref="#SkImage_encodeToData_2_pixelSerializer">pixelSerializer</a> selects default serialization which
accepts all data and encodes to PNG.
Returns nullptr if existing encoded data is missing or invalid and
Return a new image that is a <ahref="#SkImage_makeSubset_subset">subset</a> of this image. The underlying implementation may
share the pixels, or it may make a copy.
If <ahref="#SkImage_makeSubset_subset">subset</a> does not intersect the <ahref="#SkImage_bounds">bounds</a> of this image, or the copy/share cannot be made,
Apply a given image <ahref="#SkImage_makeWithFilter_filter">filter</a> to this image, and return the filtered result.
The <ahref="#SkImage_makeWithFilter_subset">subset</a> represents the active portion of this image. The return value is similarly an
<ahref="#SkImage">SkImage</a>, with an active <ahref="#SkImage_makeWithFilter_subset">subset</a> (<ahref="#SkImage_makeWithFilter_outSubset">outSubset</a>). This is usually used with texture-backed
images, where the texture may be approx-match and thus larger than the required size.
<ahref="#SkImage_makeWithFilter_clipBounds">clipBounds</a> constrains the device-space extent of the image, stored in <ahref="#SkImage_makeWithFilter_outSubset">outSubset</a>.
<ahref="#SkImage_makeWithFilter_offset">offset</a> is storage, set to the amount to translate the result when drawn.
If the result image cannot be created, or the result would be transparent black, null
is returned, in which case the <ahref="#SkImage_makeWithFilter_offset">offset</a> and <ahref="#SkImage_makeWithFilter_outSubset">outSubset</a> parameters should be ignored by the
<ahref="undocumented#GrBackendTexture">GrBackendTexture</a> and <ahref="#SkImage_BackendTextureReleaseProc">BackendTextureReleaseProc</a> are populated on success. It is the callers
responsibility to call the <ahref="#SkImage_BackendTextureReleaseProc">BackendTextureReleaseProc</a> once they have deleted the texture.
Note that the <ahref="#SkImage_BackendTextureReleaseProc">BackendTextureReleaseProc</a> allows <ahref="undocumented#Skia">Skia</a> to clean up auxiliary data related
to the <ahref="undocumented#GrBackendTexture">GrBackendTexture</a>, and is not a substitute for the client deleting the <ahref="undocumented#GrBackendTexture">GrBackendTexture</a>
themselves.
If <ahref="#SkImage_MakeBackendTextureFromSkImage_image">image</a> is both texture backed and singly referenced; that is, its only
reference was transferred using std::move(): <ahref="#SkImage_MakeBackendTextureFromSkImage_image">image</a> is returned in <ahref="#SkImage_MakeBackendTextureFromSkImage_backendTexture">backendTexture</a>
without conversion or making a copy.
If the <ahref="#SkImage">SkImage</a> is not texture backed, this function will generate a texture with the <ahref="#SkImage_MakeBackendTextureFromSkImage_image">image</a>'s
Creates raster <ahref="SkBitmap_Reference#Bitmap">Bitmap</a> with same pixels as <ahref="#Image">Image</a>. If <ahref="#SkImage_asLegacyBitmap_legacyBitmapMode">legacyBitmapMode</a> is <ahref="#SkImage_kRO_LegacyBitmapMode">kRO LegacyBitmapMode</a>,
returned <ahref="#SkImage_asLegacyBitmap_bitmap">bitmap</a> is read-only and immutable.
Returns true if <ahref="SkBitmap_Reference#Bitmap">Bitmap</a> is stored in <ahref="#SkImage_asLegacyBitmap_bitmap">bitmap</a>. Returns false and resets <ahref="#SkImage_asLegacyBitmap_bitmap">bitmap</a> if <ahref="SkBitmap_Reference#Bitmap">Bitmap</a>
If <ahref="#SkImage_makeColorSpace_target">target</a> is supported, returns an <ahref="#SkImage">SkImage</a> in <ahref="#SkImage_makeColorSpace_target">target</a> color space.
Otherwise, returns nullptr.
This will leave the image as is if it already in <ahref="#SkImage_makeColorSpace_target">target</a> color space.
Otherwise, it will convert the pixels from <ahref="#Image">Image</a> color space to <ahref="#SkImage_makeColorSpace_target">target</a>
color space. If this-><ahref="#SkImage_colorSpace">colorSpace</a> is nullptr, <ahref="#Image">Image</a> color space will be
treated as <ahref="undocumented#sRGB">sRGB</a>.
If <ahref="#SkImage_makeColorSpace_premulBehavior">premulBehavior</a> is <ahref="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a>: converts <ahref="#Image">Image</a>
pixels to a linear space before converting to match destination <ahref="#Color_Type">Color Type</a>
and <ahref="undocumented#Color_Space">Color Space</a>.
If <ahref="#SkImage_makeColorSpace_premulBehavior">premulBehavior</a> is <ahref="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a>: <ahref="#Image">Image</a>
pixels are treated as if they are linear, regardless of how they are encoded.