同一张图片实例
来源:互联网 发布:origin label数据值 编辑:程序博客网 时间:2024/04/28 01:29
刘若英在互联网上的相同图片转载
http://finance.ce.cn/money/200609/25/t20060925_8715973.shtml下面的
http://finance.ce.cn/money/200609/25/W020060925540909722371.jpg图片
和 http://www.pclady.com.cn/sense/xz/0502/33927.html下面的
http://www.pclady.com.cn/sense/xz/0502/pic/20050217liuruo_(10).jpg
是同一张图片(如下)
/** *//**
* 计算文件对应的
*/
public static long calFingerPrint(String path)
...{
String str="";
try
...{
FileInputStream in = new FileInputStream(path);
DataInputStream din = new DataInputStream(in);
while(din.read()>=0)
...{
char test = din.readChar();
str = str + String.valueOf(test);
}
}
catch(Exception e)
...{
e.getStackTrace();
}
// 测试使用
//System.out.println(str);
// 调用函数
System.out.println(APHash(str));
return (APHash(str));
}
/** *//**
*
*/
public static long APHash(String str)
...{
long hash = 0xAAAAAAAA;
for(int i = 0; i < str.length(); i++)
...{
if ((i & 1) == 0)
...{
hash ^= ((hash << 7) ^ str.charAt(i) ^ (hash >> 3));
}
else
...{
hash ^= (~((hash << 11) ^ str.charAt(i) ^ (hash >> 5)));
}
}
return hash;
}
* 计算文件对应的
*/
public static long calFingerPrint(String path)
...{
String str="";
try
...{
FileInputStream in = new FileInputStream(path);
DataInputStream din = new DataInputStream(in);
while(din.read()>=0)
...{
char test = din.readChar();
str = str + String.valueOf(test);
}
}
catch(Exception e)
...{
e.getStackTrace();
}
// 测试使用
//System.out.println(str);
// 调用函数
System.out.println(APHash(str));
return (APHash(str));
}
/** *//**
*
*/
public static long APHash(String str)
...{
long hash = 0xAAAAAAAA;
for(int i = 0; i < str.length(); i++)
...{
if ((i & 1) == 0)
...{
hash ^= ((hash << 7) ^ str.charAt(i) ^ (hash >> 3));
}
else
...{
hash ^= (~((hash << 11) ^ str.charAt(i) ^ (hash >> 5)));
}
}
return hash;
}
d:/pic/3.jpg
-6017656694129725600
d:/pic/4.jpg
-6017656694129725600
- 同一张图片实例
- 判断UIImage图片是否是同一张图片
- 为什么再次调用编辑器总是加载同一张图片?
- NPOI在多个sheet插入同一张图片
- 关于不同设备下载同一张图片适配问题
- OpenCV同一窗口显示多张图片实现
- input file 重复上传同一张图片失效的解决办法
- 利用ConstantState判断两张图片是否为drawable中同一张图片
- 图片相似度算法,可识别出缩放,拉伸,亮暗后的同一张图片
- python 实现 图片对比 看是不是同一张图片 入门级别 有待提高
- 页面同一位置重叠多张图片,鼠标点击切换特效
- 解决屏幕有时会闪现同一张图片2次的原因
- 自定义viewpager 三张图片在同一屏幕轮播的效果
- onethink后台上传图片,同一张图只能上传一次的问题
- PHP如何在同一张图片上动态P上二维码
- opencv3.3和opencv2.12的imread 读取同一张图片读出来的结果不一致
- 从数据库中读取多张图片并显示在同一页面中
- iOS8之后, 保存图片到本地相册, 避免重复保存同一张
- 用C#画图的方法收集
- 三种继承方式与三种访问权限的相互组合
- 好文章就是心灵可乐,与大家共勉!
- C/C++头文件一览 转载
- 泛型集合类型,赋予集合业务意义,增强集合的抽象使用
- 同一张图片实例
- 感谢open-open的工作人员,如此迅速收录我的项目……
- J2ME短信
- 计算机图形学_三维物体的绘制及其旋转
- 近在咫尺-远在天涯
- 软件测试面试题(部分收集)
- 计算机图形学_矩形的旋转
- Delphi面向对象编程的20条规则(转载)
- 介绍J2ME可选包WMA(JSR120)