Page 1 of 1

How to use SparseColor from PerlMagick?

Posted: 2013-08-07T06:05:07-07:00
by joew
Hello,

I am somewhat confused about how to use the SparseColor method.

I would like to do the aequivalent of

Code: Select all

convert [...] -sparse-color barycentric "0,0 yellow -%w,%h yellow  %w,%h limegreen" [...]
I have tried:

Code: Select all

$image->SparseColor(method=>"Barycentric", points=>"0,0 yellow -%w,%h yellow  %w,%h limegreen");
and

Code: Select all

$image->SparseColor(method=>"Barycentric", "0,0 yellow -%w,%h yellow  %w,%h limegreen");
and

Code: Select all

$image->SparseColor(method=>["Barycentric", "0,0 yellow -%w,%h yellow  %w,%h limegreen"]);
Any hints how to properly use this method?