P.S.

You can use  -evaluate multiply 0.5 or  +level 0,50%  (note the + 
sign)  in place of -modulate 50%

_________________________



This creates a test gradient 3 frame gif image:

convert \( -size 100x100 gradient: \) +clone +clone grad3stack.gif

Your #999999 is equivalent to 60%. Using percent, you can do it as follows:

convert \( grad3stack.gif -black-threshold 60% -transparent black \) null: \
        \( grad3stack.gif -white-threshold 60% -modulate 50% 
-transparent gray50 \) \
        -layers composite grad3stack_60pct.gif

everything above at 60% or above will be kept the same and everything 
below 60% will be at half brightness (as determined by the -modulate 
50% and the gray50. So if you want something other than 50 brightness 
(absolute not change), then change those numbers accordingly.

Fred


Note that my script, plm, will do that on an single frame image, but 
not a multi-frame image. So you would have to separate frames, 
process each in a shell script loop with plm and then reconstitute 
the animation. But the plm command is much simpler as it is 
piece-wise linear mapping. For example on any frame

plm "0,0 60,30 61,61 100,100" image.gif result.gif

Here 0 goes to 0, 60 goes to 30, 61 stays at 61 and 100 stays at 100. 
These are the break points in percent graylevel of a piecewise linear 
transformation. Thus everything from 0 to 60 is mapped to 0 to 30 
(half its value) and everything from 61 to 100, stays unchanged.






>Hi,
>
>Thanks for the reply...  Actually I realized what I am actually wanting
>to do is lower the brightness under a certain threshold.
>
>Is there a way to say (this is for a grayscale gif animation) all
>colors from #999999 -> #ffffff stay the same, but #000000 -> #888888
>get lowered 50%
>
>?
>
>Patrick J. Collins
>http://collinatorstudios.com
>
>
>On Fri, 11 Jul 2008, Fred Weinhaus wrote:
>
>>  use -modulate
>>
>>  convert animation.gif -modulate 50% animation_50.gif
>>
>>  makes it 50% darker.
>>
>>
>>  see http://www.imagemagick.org/script/command-line-options.php#modulate
>>
>>
>>  simple example using multiframe gif:
>>
>>  convert rose: rose.gif
>>  convert rose.gif rose.gif rose.gif rose3.gif
>>  convert rose3.gif -modulate 50% rose3_mod50.gif
>>
>>
>>
>>
>>
>>
>>  >Hi,
>>  >
>>  >I was looking through all the documentation for animated gifs trying
>>  >to find how to do this, but I just couldn't find it...
>>  >
>>  >I am looking for a way to take an animated gif image and lower its
>>  >brightness by a certain percentage...  How can I do this?
>>  >
>>  >Thank you.
>>  >
>>  >Patrick J. Collins
>>  >http://collinatorstudios.com
>>  _______________________________________________
>>  Magick-users mailing list
>>  [email protected]
>>  http://studio.imagemagick.org/mailman/listinfo/magick-users
>>  .
>>
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to