5 ms·
I went about depdup in a similar but opposite way then you did - https://github.com/mgolub2/photodb https://github.com/mgolub2/photodb I used libraw to read th
by buildbot 3y ago
I went about depdup in a similar but opposite way then you did - https://github.com/mgolub2/photodb https://github.com/mgolub2/photodb
I used libraw to read the actual raw data from my images, ignoring possible metadata that can get changed/updated by Capture One for example. The raw data is just fed into a hashing function, to get an exact content hash. Does not work if your image is down-sampled of course, but that was actually my goal - I want to know if the raw content has changed/bit flipped, but don't care if the metadata is altered or missing.
- mceachen 3y agoAh! In this case, you might be happy to discover that ExifTool just added an "image content" hash--it's the SHA (or MD5 or whatever) hash of the _actual image bytes_, after ignoring the metadata header (and possible footer) payloads. So if you, say, change the rotation of your RAW image file (which normally will just add or change the EXIF `Orientation` tag), the image content hash will stay the same. See https://exiftool.org/ExifTool.html#ImageHashType https://exiftool.org/ExifTool.html#ImageHashType (of course, your current approach should prove substantively faster, but will only work with the formats that libraw supports)