19 package Beatmup.Android;
21 import android.graphics.BitmapFactory;
23 import java.io.FileDescriptor;
24 import java.io.InputStream;
26 import Beatmup.Context;
41 super(context, bitmap);
52 if (bitmap.getConfig() != android.graphics.Bitmap.Config.ALPHA_8 && bitmap.getConfig() != android.graphics.Bitmap.Config.ARGB_8888) {
53 android.graphics.
Bitmap copy = bitmap.copy(android.graphics.Bitmap.Config.ARGB_8888,
true);
55 return new Bitmap(context, copy);
57 return new Bitmap(context, bitmap);
67 android.graphics.
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
81 android.graphics.
Bitmap bitmap = BitmapFactory.decodeFile(path, options);
98 android.graphics.Rect outPadding,
99 BitmapFactory.Options options
100 )
throws OutOfMemoryError
102 android.graphics.
Bitmap bitmap = BitmapFactory.decodeFileDescriptor(file, outPadding, options);
116 return new Bitmap(context, android.graphics.Bitmap.createBitmap(width, height, android.graphics.Bitmap.Config.ARGB_8888));
127 return new Bitmap(context, android.graphics.Bitmap.createBitmap(width, height, android.graphics.Bitmap.Config.ALPHA_8));
static Bitmap decodeStream(Context context, InputStream inputStream)
Decodes a bitmap from stream.
android.graphics.Bitmap getBitmap()
static Bitmap createEnsuringPixelFormat(Context context, android.graphics.Bitmap bitmap)
Creates new bitmap from a source Android bitmap converting the data into appropriate pixel format if ...
android.graphics.Bitmap source
wrapped Android bitmap
static Bitmap createColorBitmap(Context context, int width, int height)
Creates empty ARGB bitmap of specified size.
static Bitmap decodeFileDescriptor(Context context, FileDescriptor file, android.graphics.Rect outPadding, BitmapFactory.Options options)
Loads a bitmap from file.
static Bitmap createGrayscaleBitmap(Context context, int width, int height)
Creates empty grayscale bitmap of specified size.
static Bitmap decodeFile(Context context, String path, BitmapFactory.Options options)
Loads a bitmap from file.
Bitmap(Context context, android.graphics.Bitmap bitmap)
Creates new bitmap from Android bitmap object without memory copy.
synchronized void dispose()
Destroys the native object.
Beatmup engine context for Android.