Android Utililty Methods Bitmap Transform

List of utility methods to do Bitmap Transform

Description

The list of methods to do Bitmap Transform are organized into topic(s).

Method

Bitmaptransform(Matrix scaler, Bitmap source, int targetWidth, int targetHeight, boolean scaleUp, boolean recycle)
transform
int deltaX = source.getWidth() - targetWidth;
int deltaY = source.getHeight() - targetHeight;
if (!scaleUp && (deltaX < 0 || deltaY < 0)) {
    Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight,
            Bitmap.Config.ARGB_8888);
    Canvas c = new Canvas(b2);
    int deltaXHalf = Math.max(0, deltaX / 2);
    int deltaYHalf = Math.max(0, deltaY / 2);
...
Bitmaptransform(Matrix scaler, Bitmap source, int targetWidth, int targetHeight, int options)
Transform source Bitmap to targeted width and height.
boolean scaleUp = (options & OPTIONS_SCALE_UP) != 0;
boolean recycle = (options & OPTIONS_RECYCLE_INPUT) != 0;
int deltaX = source.getWidth() - targetWidth;
int deltaY = source.getHeight() - targetHeight;
if (!scaleUp && (deltaX < 0 || deltaY < 0)) {
    Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight,
            Bitmap.Config.ARGB_8888);
    Canvas c = new Canvas(b2);
...