SKImage.FromAdoptedTexture Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FromAdoptedTexture(GRContext, GRBackendTexture, SKColorType)
Creates a new image from the specified texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRContext
The graphics context.
- texture
- GRBackendTexture
The description of the existing backend texture.
- colorType
- SKColorType
The color type to use for the image.
Returns
Returns the new image, or null if the specified texture is unsupported.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRRecordingContext, GRBackendTexture, SKColorType)
Creates an image from the specified texture, taking ownership of the texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU context.
- texture
- GRBackendTexture
The backend texture.
- colorType
- SKColorType
The color type of the image.
Returns
Returns a new image, or null if the texture is invalid.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)
Creates a new image from the specified texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRContext
The graphics context.
- texture
- GRBackendTexture
The description of the existing backend texture.
- origin
- GRSurfaceOrigin
The origin of the texture.
- colorType
- SKColorType
The color type to use for the image.
Returns
Returns the new image, or null if the specified texture is unsupported.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)
Creates an image from the specified texture, taking ownership of the texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
Parameters
- context
- GRRecordingContext
The GPU context.
- texture
- GRBackendTexture
The backend texture.
- origin
- GRSurfaceOrigin
The origin of the texture.
- colorType
- SKColorType
The color type of the image.
Returns
Returns a new image, or null if the texture is invalid.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType)
Creates a new image from the specified texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha);
Parameters
- context
- GRContext
The graphics context.
- texture
- GRBackendTexture
The description of the existing backend texture.
- origin
- GRSurfaceOrigin
The origin of the texture.
- colorType
- SKColorType
The color type to use for the image.
- alpha
- SKAlphaType
The transparency mode to use for the image.
Returns
Returns the new image, or null if the specified texture is unsupported.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType)
Creates an image from the specified texture, taking ownership of the texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha);
Parameters
- context
- GRRecordingContext
The GPU context.
- texture
- GRBackendTexture
The backend texture.
- origin
- GRSurfaceOrigin
The origin of the texture.
- colorType
- SKColorType
The color type of the image.
- alpha
- SKAlphaType
The alpha type of the image.
Returns
Returns a new image, or null if the texture is invalid.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace)
Creates a new image from the specified texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace);
Parameters
- context
- GRContext
The graphics context.
- texture
- GRBackendTexture
The description of the existing backend texture.
- origin
- GRSurfaceOrigin
The origin of the texture.
- colorType
- SKColorType
The color type to use for the image.
- alpha
- SKAlphaType
The transparency mode to use for the image.
- colorspace
- SKColorSpace
The colorspace to use for the image.
Returns
Returns the new image, or null if the specified texture is unsupported.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.
Applies to
FromAdoptedTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace)
Creates an image from the specified texture, taking ownership of the texture.
public static SkiaSharp.SKImage FromAdoptedTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace);
Parameters
- context
- GRRecordingContext
The GPU context.
- texture
- GRBackendTexture
The backend texture.
- origin
- GRSurfaceOrigin
The origin of the texture.
- colorType
- SKColorType
The color type of the image.
- alpha
- SKAlphaType
The alpha type of the image.
- colorspace
- SKColorSpace
The colorspace of the image.
Returns
Returns a new image, or null if the texture is invalid.
Remarks
SkiaSharp will delete or recycle the texture when the image is released.