1
我使用下面的代碼合併2個不同的位圖到1如何在Canvas.drawBitmap合併兩個圖像時提高圖像質量?
public Bitmap combineImages(Bitmap c, Bitmap s) {
Bitmap cs = null;
int width, height = 0;
width = c.getWidth() + (s.getWidth()/2);
height = c.getHeight() + (s.getHeight()/2);
cs = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas comboImage = new Canvas(cs);
comboImage.drawBitmap(c, 0f, 0f, null);
comboImage.drawBitmap(s, c.getWidth() - (s.getWidth()/2), c
.getHeight()
- (s.getHeight()/2), null);
return cs;
}
它的工作好。但問題是,它使我的形象變成藍色。
基本上我的完整代碼在這裏。 My Full Code我正在做的是將我的Base64字符串圖像轉換爲位圖。你認爲這可能是問題?
我只是想避免模糊我的圖片...
您是否找到任何解決方案?我也有同樣的問題! – Misko 2011-06-04 01:16:30
哦,是的,我只是製作了hdpi,mdpi,ldpi「+」圖片的3張圖片。它適用於我。 那麼你不應該回答,但評論我的問題。 – Arslan 2011-06-04 03:26:46