有没有办法查找这种方法的实现/源代码?它在API中需要这样来比较两个图像,因为它会覆盖原始图像,并且在将图像视图转换为位图多次后,图像看起来不再漂亮。 http://developer.android.com/reference/android/graphics/Bitmap.html#sameAs(android.graphics.Bitmap)
位图图像比较
我正在做这种方法从图像创建一个位图,并将其设置为一个ImageView,让用户编辑他的图片。
public static Bitmap getBitmap(ImageView imageView) {
BitmapDrawable mDrawable = (BitmapDrawable) imageView.getDrawable();
Bitmap b = mDrawable.getBitmap();
return b;
}
然而,在保存和从数据库中检索它来编辑它的好几倍,将图像从这个变成:
这样:
,最后这一点:
所以我需要一种方法来检测图像是否没有改变,我不重新保存这个位图的字节数组到t他数据库。
能否请您详细说明,因为我没有帮你吗? – 2011-05-16 11:11:52
基本上我需要一种方法来比较两个位图图像,无论是逐个像素还是整个位图。 – louieansonng 2011-05-16 11:34:10
@ louieansonng你有什么解决方案吗? – dipali 2015-12-21 10:12:12