I'm not understanding Signature and pixel stream methods
Posted: 2016-05-10T09:10:48-07:00
Hello.
I am motivated by a desire to use SignatureImage() to check to see if image files are duplicates, disregarding differences in metadata. I know there are other methods for comparing photos but here a simple "identical or not identical" is all I'm after and I had thought it would be easiest. Looking into it I see that the signature method isn't stable across versions but what I don't understand is, why would it produce different results on different machines when operating on the same file? For that matter why would the same 'stream' command run on different machines produce different results?
Situation:
ImageMagick 6.9.4-0 Q16 x86_64 2016-05-09 http://www.imagemagick.org
Compiled on two machines:
Linux 3.16.0-38-generic #52~14.04.1-Ubuntu SMP x86_64 GNU/Linux
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2 x86_64 GNU/Linux
$ ./magick.sh identify -format "%#" image.jpg
gets you one thing on one machine and something else on another. This is definitely the same file, same sha1sum result.
also,
$ ./magick.sh stream -map rgb -storage-type char image.jpg - | sha1sum
gets you different results.
Is this normal behavior? Is the generation of the pixel stream done by other libraries which I might have different versions of on each machine? I had thought the resulting pixel stream would have to come out the same for any correct implementation but I'm no expert on this. Could having different versions of libjpeg on each machine be what's causing this?
I am motivated by a desire to use SignatureImage() to check to see if image files are duplicates, disregarding differences in metadata. I know there are other methods for comparing photos but here a simple "identical or not identical" is all I'm after and I had thought it would be easiest. Looking into it I see that the signature method isn't stable across versions but what I don't understand is, why would it produce different results on different machines when operating on the same file? For that matter why would the same 'stream' command run on different machines produce different results?
Situation:
ImageMagick 6.9.4-0 Q16 x86_64 2016-05-09 http://www.imagemagick.org
Compiled on two machines:
Linux 3.16.0-38-generic #52~14.04.1-Ubuntu SMP x86_64 GNU/Linux
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2 x86_64 GNU/Linux
$ ./magick.sh identify -format "%#" image.jpg
gets you one thing on one machine and something else on another. This is definitely the same file, same sha1sum result.
also,
$ ./magick.sh stream -map rgb -storage-type char image.jpg - | sha1sum
gets you different results.
Is this normal behavior? Is the generation of the pixel stream done by other libraries which I might have different versions of on each machine? I had thought the resulting pixel stream would have to come out the same for any correct implementation but I'm no expert on this. Could having different versions of libjpeg on each machine be what's causing this?