Sparse Color
Posted: 2011-06-20T09:59:31-07:00
So, basically, here is command-line script:
I've already found function SparseColor, which can be used to interpret right side of the string:
But haven't figured out what should I pass to this function as arguments yet.
Is there any way to Interpret this line:
in PerlMagick API? Basically this is executing program which gets all the pixels from the source and writes them as rgba values:
pixels.txt:
Also, there is argument "points=>array of float values" in SparseColor function — how should look like this array? Can I use data like this (in pixels.txt) as argument so its looks like:
$image->SparseColor(points=>"@pixels.txt",...); ?
Another question is what means '\@-' as argument and how to add it in PerlMagick API?
Any comments are welcome. Thanks for your time.
Code: Select all
convert m_f.png txt:- | sed '1d; / 0) /d; s/:.* /,/;' | convert m_f.png -alpha off -sparse-color shepards '\@-' m_f.png
Code: Select all
convert m_f.png -alpha off -sparse-color shepards '\@-' m_f.png
Is there any way to Interpret this line:
Code: Select all
convert m_f.png txt:-
pixels.txt:
Code: Select all
...
1676,57,rgba(225,243,250,1)
1677,57,rgba(225,243,250,1)
1678,57,rgba(225,243,250,1)
...
$image->SparseColor(points=>"@pixels.txt",...); ?
Another question is what means '\@-' as argument and how to add it in PerlMagick API?
Any comments are welcome. Thanks for your time.