public class

BitmapUtils

extends Object
java.lang.Object
   ↳ com.carto.utils.BitmapUtils

Class Overview

A helper class for loading bitmaps and converting Bitmaps to Android Bitmaps an vice versa.

Summary

Public Methods
static Bitmap createAndroidBitmapFromBitmap(Bitmap bitmap)
Creates a new Android Bitmap from an existing Bitmap.
static Bitmap createBitmapFromAndroidBitmap(Bitmap androidBitmap)
Creates a new Bitmap object from an existing Android Bitmap.
synchronized void delete()
static Bitmap loadBitmapFromAssets(String assetPath)
Loads the specified bitmap asset bundled with the application.
static Bitmap loadBitmapFromFile(String filePath)
Loads bitmap from specified file.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Bitmap createAndroidBitmapFromBitmap (Bitmap bitmap)

Creates a new Android Bitmap from an existing Bitmap.

Parameters
bitmap The existing bitmap.
Returns
  • The android Bitmap.

public static Bitmap createBitmapFromAndroidBitmap (Bitmap androidBitmap)

Creates a new Bitmap object from an existing Android Bitmap.

Parameters
androidBitmap The reference Android bitmap.
Returns
  • The created bitmap.

public synchronized void delete ()

public static Bitmap loadBitmapFromAssets (String assetPath)

Loads the specified bitmap asset bundled with the application.

Parameters
assetPath The asset path to the image to be loaded.
Returns
  • The loaded bitmap.

public static Bitmap loadBitmapFromFile (String filePath)

Loads bitmap from specified file.

Parameters
filePath The path to the image to be loaded.
Returns
  • The loaded bitmap.