Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在合并两个图像时提高Canvas.drawBitmap上的图像质量?_Android_Image Processing_Android Widget - Fatal编程技术网

Android 如何在合并两个图像时提高Canvas.drawBitmap上的图像质量?

Android 如何在合并两个图像时提高Canvas.drawBitmap上的图像质量?,android,image-processing,android-widget,Android,Image Processing,Android Widget,我使用以下代码将2个不同的位图合并为1个 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

我使用以下代码将2个不同的位图合并为1个

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;
}

它工作得很好。但问题是它使我的图像模糊

基本上我的完整代码在这里。我正在做的是将Base64字符串图像转换为位图。你认为这可能是什么问题


我只是想防止我的图像模糊…

哦,是的,我只是用适当的分辨率制作了3幅hdpi、mdpi、ldpi“+”图像。这对我很有用。

你找到解决办法了吗?我也有同样的问题!哦,是的,我刚刚制作了hdpi、mdpi、ldpi“+”图像的3幅图像。这对我很有用。你不应该回答,但要评论我的问题。