Android Programming Press on the image to return to the main documentation page.

BitmapPlus

Written by Frederic Leneuf-Magaud

List of types:

BitmapPlus

BitmapPlus


Events:

None

Members:


  createScaledBitmap (src As android.graphics.Bitmap, dstWidth As Int, dstHeight As Int, filter As Boolean) As android.graphics.Bitmap

  Crop (src As android.graphics.Bitmap, x As Int, y As Int, width As Int, height As Int) As android.graphics.Bitmap

  GetImageDimensions (Location As String) As Map

  getPixels (src As android.graphics.Bitmap, pixels() As Int, offset As Int, stride As Int, x As Int, y As Int, width As Int, height As Int)

  IsRecycled (bmp As android.graphics.Bitmap) As Boolean

  Recycle (bmp As android.graphics.Bitmap)

  ReduceColors (src As android.graphics.Bitmap) As android.graphics.Bitmap

  Rotate (src As android.graphics.Bitmap, width As Int, height As Int, degrees As Int, filter As Boolean) As android.graphics.Bitmap

Members description:

createScaledBitmap (src As android.graphics.Bitmap, dstWidth As Int, dstHeight As Int, filter As Boolean) As android.graphics.Bitmap
Creates a new bitmap, scaled from an existing bitmap, when possible.
If the specified width and height are the same as the current width and height of the source bitmap, the source bitmap is returned and no new bitmap is created.

Parameters:
src: The source bitmap.
dstWidth: The new bitmap's desired width.
dstHeight: The new bitmap's desired height.
filter: True if the source should be filtered.
Crop (src As android.graphics.Bitmap, x As Int, y As Int, width As Int, height As Int) As android.graphics.Bitmap
Creates a bitmap by removing the outer parts of another one
GetImageDimensions (Location As String) As Map
getPixels (src As android.graphics.Bitmap, pixels() As Int, offset As Int, stride As Int, x As Int, y As Int, width As Int, height As Int)
Returns in pixels() a copy of the data in the bitmap. Each value is a packed int representing a Color.
The stride parameter allows the caller to allow for gaps in the returned pixels array between rows.
For normal packed results, just pass width for the stride value.

Parameters:
pixels: The array to receive the bitmap's colors
offset: The first index to write into pixels()
stride: The number of entries in pixels() to skip between rows (must be >= bitmap's width). Can be negative.
x: The x coordinate of the first pixel to read from the bitmap
y: The y coordinate of the first pixel to read from the bitmap
width: The number of pixels to read from each row
height: The number of rows to read
IsRecycled (bmp As android.graphics.Bitmap) As Boolean
Recycle (bmp As android.graphics.Bitmap)
ReduceColors (src As android.graphics.Bitmap) As android.graphics.Bitmap
Converts a bitmap from the format ARGB_8888 to the format RGB_565 to save memory.
Rotate (src As android.graphics.Bitmap, width As Int, height As Int, degrees As Int, filter As Boolean) As android.graphics.Bitmap
Rotates the given bitmap by the specified number of degrees
Top