Allocation.CreateFromBitmap 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
CreateFromBitmap(RenderScript, Bitmap) |
Creates an Allocation from a |
CreateFromBitmap(RenderScript, Bitmap, Allocation+MipmapControl, AllocationUsage) |
Creates an Allocation from a |
CreateFromBitmap(RenderScript, Bitmap)
Creates an Allocation from a android.graphics.Bitmap
.
[Android.Runtime.Register("createFromBitmap", "(Landroid/renderscript/RenderScript;Landroid/graphics/Bitmap;)Landroid/renderscript/Allocation;", "")]
public static Android.Renderscripts.Allocation? CreateFromBitmap (Android.Renderscripts.RenderScript? rs, Android.Graphics.Bitmap? b);
[<Android.Runtime.Register("createFromBitmap", "(Landroid/renderscript/RenderScript;Landroid/graphics/Bitmap;)Landroid/renderscript/Allocation;", "")>]
static member CreateFromBitmap : Android.Renderscripts.RenderScript * Android.Graphics.Bitmap -> Android.Renderscripts.Allocation
Parameters
- rs
- RenderScript
Context to which the allocation will belong.
- b
- Bitmap
bitmap source for the allocation data
Returns
Allocation containing bitmap data
- Attributes
Remarks
Creates an Allocation from a android.graphics.Bitmap
.
With target API version 18 or greater, this Allocation will be created with #USAGE_SHARED
, #USAGE_SCRIPT
, and #USAGE_GRAPHICS_TEXTURE
. With target API version 17 or lower, this Allocation will be created with #USAGE_GRAPHICS_TEXTURE
.
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
CreateFromBitmap(RenderScript, Bitmap, Allocation+MipmapControl, AllocationUsage)
Creates an Allocation from a android.graphics.Bitmap
.
[Android.Runtime.Register("createFromBitmap", "(Landroid/renderscript/RenderScript;Landroid/graphics/Bitmap;Landroid/renderscript/Allocation$MipmapControl;I)Landroid/renderscript/Allocation;", "")]
public static Android.Renderscripts.Allocation? CreateFromBitmap (Android.Renderscripts.RenderScript? rs, Android.Graphics.Bitmap? b, Android.Renderscripts.Allocation.MipmapControl? mips, Android.Renderscripts.AllocationUsage usage);
[<Android.Runtime.Register("createFromBitmap", "(Landroid/renderscript/RenderScript;Landroid/graphics/Bitmap;Landroid/renderscript/Allocation$MipmapControl;I)Landroid/renderscript/Allocation;", "")>]
static member CreateFromBitmap : Android.Renderscripts.RenderScript * Android.Graphics.Bitmap * Android.Renderscripts.Allocation.MipmapControl * Android.Renderscripts.AllocationUsage -> Android.Renderscripts.Allocation
Parameters
- rs
- RenderScript
Context to which the allocation will belong.
- b
- Bitmap
bitmap source for the allocation data
specifies desired mipmap behaviour for the allocation
- usage
- AllocationUsage
bit field specifying how the allocation is utilized
Returns
Allocation containing bitmap data
- Attributes
Remarks
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.