[magick-users] Color to B&W

Anthony Thyssen anthony at griffith.edu.au
Mon Dec 18 22:43:03 CST 2006


Hugemann on  wrote...
| For test purposes you may establish any other color weighting by use of 
| the -fx operator, for instance:
| 
| convert -fx '0.3*r+0.4*g+0.3*b' rgb.gif gray.jpg
| 
First.   Read the image before you process it  ;-)
get into the habit of doing this and you will not get into the
trouble that existed with IM v5.

For speed and larger images I suggest you linit that to just one
channel, and then separate that channel as a greyscale image.  :-)

  convert rgb.gif -channel R -fx '0.3*r+0.4*g+0.3*b' -separate grey.gif

With a very large image the above will be at least twice as fast.


  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
                                                        \
                  @                                     |\
                 (===B---------------------------------/__\
                  \|==B--------------------------------\  /
                  ))                                    |/
          ________LL____ Watch those ground passes! ___ / ________
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-users mailing list