Bitmap.ColorSpace Property

Definition

Returns the color space associated with this bitmap. -or- Modifies the bitmap to have the specified ColorSpace, without affecting the underlying allocation backing the bitmap.

public Android.Graphics.ColorSpace? ColorSpace { [Android.Runtime.Register("getColorSpace", "()Landroid/graphics/ColorSpace;", "", ApiSince=26)] get; [Android.Runtime.Register("setColorSpace", "(Landroid/graphics/ColorSpace;)V", "", ApiSince=29)] set; }
[<get: Android.Runtime.Register("getColorSpace", "()Landroid/graphics/ColorSpace;", "", ApiSince=26)>]
[<set: Android.Runtime.Register("setColorSpace", "(Landroid/graphics/ColorSpace;)V", "", ApiSince=29)>]
member this.ColorSpace : Android.Graphics.ColorSpace with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns the color space associated with this bitmap. If the color space is unknown, this method returns null.

Java documentation for android.graphics.Bitmap.getColorSpace().

Property setter documentation:

Modifies the bitmap to have the specified ColorSpace, without affecting the underlying allocation backing the bitmap.

This affects how the framework will interpret the color at each pixel. A bitmap with Config#ALPHA_8 never has a color space, since a color space does not affect the alpha channel. Other Configs must always have a non-null ColorSpace.

Java documentation for android.graphics.Bitmap.setColorSpace(android.graphics.ColorSpace).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to