Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; public class Main { private static Config getConfig(Bitmap bitmap) { Config config = bitmap.getConfig(); return config == null ? Config.ARGB_8888 : config; } }