Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Hi, I'm trying to write a script to get the phash of generated thumbnails of files using a single command, but I'm having trouble discarding the generated thumb (which I don't need). This is the command I'm using at the moment:
But it's appending the image data after all of the identify info. Is there a better command to use that'll only return image information and not the binary data as well? This is on Windows if it makes a difference...
I am not sure what "image data" you mean. But -moments added to identify -verbose just adds the moments to the verbose information that one would get form identify -verbose. You will have to parse the text output to get just the Hu moments and PHASH values, which are 42 float values.
Alternately, I have some other perceptual hashes in my phashes bash unix shell script at my link below. This script can be run from Windows 10 Unix or Windows w/Cygwin. It generates a binary string for the hash, which can be stored in the image meta data or exported for use elsewhere.
@ch1902: You are writing to an image format, "miff:", so you also get the image as well as the text. If you write to "info:" instead, you will get just the text information.