[magick-users] Need help covering up misalignment of RGB channels

David Shean dshean at msss.com
Wed Feb 20 13:25:33 PST 2008


Hello all,
I'm writing with what should be a relatively simple task.  I've never  
tried to do anything beyond simple conversions, resizing, composites,  
etc. using IM, so I'm sort of a newbie.
I am starting with three individual images, representing R G and B  
bands that I combine into a single RGB image.  In the resulting  
image, the individual bands do not line up properly (an issue  
inherent in the individual bands, not anything that I can control).   
I've attached a small section as an example.
I want to set the entire region to 0 while preserving the surrounding  
areas where the RGB pixel value is correct.  In other words, if the  
value is 0 on an individual band, it should be 0 in the final image.   
I have been playing with fx statements, but I'm having trouble with  
syntax, and it is SLOW.
I know there must be a simple and FAST solution.  Perhaps creating a  
mask from the individual bands and then applying it over the RGB  
image?  I need to run this as a step in a script to process many of  
these images (~11 mb each).
Thanks for any suggestions.
-David


-------------- next part --------------




More information about the Magick-users mailing list