0
32ビットPNGイメージからALPHA_8構成のビットマップを作成します。それを行うには、私はdecodeResource(Resources res, int id, Options opts)
と呼ばれます。opts.inPreferredConfig = Bitmap.Config.ALPHA_8
です。ただし、ARGB_8888設定のビットマップを返します。inPreferredConfig = Bitmap.Config.ALPHA_8でBitmapFactory.decodeResourceを実行すると、Bitmap.Config.ARGB_8888でビットマップが返されるのはなぜですか?
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.ALPHA_8;
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), id, options);
// Output: "bitmap.getConfig() returns ARGB_8888"
Log.w(tag, "bitmap.getConfig() returns " + bitmap.getConfig());
なぜそれが起こりますか?正しく動作させるには?