identify -unique doesn't work

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?".
Post Reply
Misty

identify -unique doesn't work

Post by Misty »

According to the instructions when I run the program, identify is meant to return the number of colours in an image with the syntax identify -unique. However, while it recognizes the command, it doesn't return the number of colours and ImageMagick's output is the same as if no option were selected. It seems that the only way to return the information is using identify -format %k instead. Is this a bug?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: identify -unique doesn't work

Post by magick »

Add -verbose to your command line.
Misty

Re: identify -unique doesn't work

Post by Misty »

Thank you! The command doesn't indicate that it requires -verbose; maybe that should be added to the documentation.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: identify -unique doesn't work

Post by magick »

Its a bug. Look for a fix in the next point release of ImageMagick. Thanks.
alosca
Posts: 52
Joined: 2010-03-04T17:54:57-07:00
Authentication code: 8675308
Location: Pasadena, California

Re: identify -unique doesn't work

Post by alosca »

In which release should -unique work? I have

identify --version
Version: ImageMagick 6.7.1-0 2011-07-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP HDRI

and it is not working. Just checking to see if it still is an open bug.
Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify -unique doesn't work

Post by fmw42 »

try

convert image -format "%k" info:


see http://www.imagemagick.org/script/escape.php
alosca
Posts: 52
Joined: 2010-03-04T17:54:57-07:00
Authentication code: 8675308
Location: Pasadena, California

Re: identify -unique doesn't work

Post by alosca »

Thanks! That works.
Post Reply