Here you can find the source of hashBitmap(Bitmap bitmap)
public static int hashBitmap(Bitmap bitmap)
//package com.java2s; import android.graphics.Bitmap; public class Main { public static int hashBitmap(Bitmap bitmap) { int hash_result = 0; int w = bitmap.getWidth(); int h = bitmap.getHeight(); hash_result = (hash_result << 7) ^ h; hash_result = (hash_result << 7) ^ w; for (int pixel = 0; pixel < 20; ++pixel) { int x = (pixel * 50) % w; int y = (pixel * 100) % h; hash_result = (hash_result << 7) ^ bitmap.getPixel(x, y); }/* ww w. jav a2 s .c o m*/ return hash_result; } }