PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
sdalu
Post
by sdalu » 2010-03-24T16:17:37-07:00
Is there a way to retrieve the list of unique colors used in an image?
Something like the unique-colors option of convert:
Code: Select all
convert IMG_1588.jpg -colors 6 -unique-colors txt:-
Thanks
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2010-03-24T16:47:57-07:00
The UniqueColors() method returns an image with only unique colors. Use GetPixel() or GetPixels() to return the unique colors.