David Vanderson on  wrote...
| Hello,
| 
| A few weeks ago we were doing cloud composition, which is close to 
| something that I've been doing - setting the alpha channel of each pixel 
| to the intensity of each pixel.  Anthony asked why we were using -fx, 
| which is slow, instead of -evaluate.
| 
| I confess that I've tried and failed a few times to figure out how to do 
| this with -evaluate.  Can anyone enlighten me?
| 
I thought I gave you a -evaluate solution!


-evaluate is like -fx but with some provisos.

   1/ adding and subtracting uses real color values, NOT values
      normalized to 0.0 to 1.0 as -fx does.  Instead add and subtract
      percentages.
         -evaluate subtract 50%

   2/ After every -evaluate the mathematically altered values are saved
      back into the image channel data.  As such unless the image is a
      new HCF floating point values type of image (unlikely)
      the values will be clipped at the normal color bounds for that
      image 'depth' and your IM compile time 'Q' level.

      That is   -evaluate subtract 50%   will make white colors,  grey
      but anythign darker than a mid-tone grey,  black.
      That is it clips the colors the image at 'black'.

      As such be careful of the order of -evaluate operations
      to avoid color loss from bounds clipping.

      -fx only clips AFTER the equation has been finished,

Now for your cloud problem...

Hmmm... looking back the solution wasn't to use -evaluate
but to -composite 'clones' of the clound images using mathematical
operations.

For example to  squared all the pixel values.


If you still have trouble, post a URL of an image and your attempted
command.

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
       A kite line has a field of invisibility around it,
                             as far as the public is concerned.
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to