:: How to Pass AS3 Color Transformations to IMagick

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
arturino
Posts: 6
Joined: 2012-05-04T14:44:09-07:00
Authentication code: 13

:: How to Pass AS3 Color Transformations to IMagick

Post by arturino »

oh wise list,

We have a low res image that we apply color transformations in AS3/Flash - and want to re-create the same color transformations in IM

the workflow process is : http://cl.ly/24371N3f0g0W041R380f

is this possible?
if so, i would like to hire you!

thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: :: How to Pass AS3 Color Transformations to IMagick

Post by fmw42 »

please clarify color transformations in AS3/Flash? We all do not use Flash. If you are referring to something like this http://www.adobetutorialz.com/articles/ ... lor-Matrix, then see -color-matrix in IM http://www.imagemagick.org/script/comma ... lor-matrix
arturino
Posts: 6
Joined: 2012-05-04T14:44:09-07:00
Authentication code: 13

Re: :: How to Pass AS3 Color Transformations to IMagick

Post by arturino »

I dont think ColorMatrix will work for replacing colors - therefore ColorTransform should.
here is some info : http://asgamer.com/2011/changing-colors ... n-as3-code

here is the class definition:
http://livedocs.adobe.com/flash/9.0/Act ... sform.html

thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: :: How to Pass AS3 Color Transformations to IMagick

Post by fmw42 »

see -CDL (color decision list), where you can specify a slope (multiplier) and offset (and optional gamma) for each r,g,b,a channel

http://www.imagemagick.org/script/comma ... ns.php#cdl

Otherwise, you can change colors by optionally specifying a fuzz value (color distance) and then an old color (-opaque) and a new color (-fill)

convert image -fuzz XX% -fill red -opaque blue result

see
http://www.imagemagick.org/Usage/color_basics/#replace


Or you can flood fill a region with a color (using and optional fuzz value).

see
http://www.imagemagick.org/Usage/draw/#color
Post Reply