如何通过md5比较图像工作? [英] How does comparing images through md5 work?

查看:128
本文介绍了如何通过md5比较图像工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此方法是否会比较图片的像素值?我猜它不会工作,因为他们是彼此不同的大小,但如果他们是相同的,但在不同的格式?例如,我截图并保存为 .jpg ,另一个保存为 .gif


Does this method compare the pixel values of the images? I'm guessing it won't work because they are different sizes from each other but what if they are identical, but in different formats? For example, I took a screenshot and saved as a .jpg and another and saved as a .gif.

推荐答案

MD5哈希是实际的二进制数据,因此不同的格式将有完全不同的二进制数据。

An MD5 hash is of the actual binary data, so different formats will have completely different binary data.

因此为了使MD5哈希匹配,它们必须是相同的文件。 (在边缘案例中有例外。

so for MD5 hashes to match, they must be identical files. (There are exceptions in fringe cases.)

这实际上是一种法医执法寻找被认为是违禁品的数据。 (参考图片)

This is actually one way forensic law enforcement finds data it deems as contraband. (in reference to images)

这篇关于如何通过md5比较图像工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆