Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Bitmap; import android.graphics.Bitmap.Config; public class Main { public static Bitmap ensureGLCompatibleBitmap(Bitmap bitmap) { if (bitmap == null || bitmap.getConfig() != null) return bitmap; Bitmap newBitmap = bitmap.copy(Config.ARGB_8888, false); bitmap.recycle(); return newBitmap; } }