2016-09-10 18 views
0

に、このように私はコードの下に書いた:Androidのビットマップ画像の品質問題

Bitmap bm= BitmapFactory.decodeResource(getContext().getResources(), R.drawable.level_bg); 
Rect dest = new Rect(0, 0, getWidth(), getHeight()); 
canvas.drawBitmap(bm, null, dest, paint); 

が、写真のように、私は、画像の上にいくつかの水平線を取得しています。 私もコードの下にしようとした

screenshot

BitmapFactory.Options options = new BitmapFactory.Options(); 
options.inScaled = false; 
options.inDither = false; 
options.inPreferredConfig = Bitmap.Config.ARGB_8888; 
Bitmap bm = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.level_bg, options); 
Paint paint = new Paint(); 
paint.setFilterBitmap(true); 
canvas.drawBitmap(bm, null, dest, paint); 

任意のヘルプ?

+0

[これは参考になるかもしれませんが、私は同様の質問を見つけました:http://stackoverflow.com/a/4822358/4479310](http://stackoverflow.com/a/4822358/4479310) – PEF

+0

@PEfしませんでした作業。周りの他のすべての作品ですか? – androoo

答えて

0

私はこれが他の画像に起こるかどうか確認したい(ランダムなものを試してみる)。開始するには解像度が低すぎたり、色のビット深度が小さすぎる場合は、表示している画像が伸び過ぎている可能性があります。

+0

ええ、私は同じ、幸運を試してみました! – androoo

関連する問題