I am trying to create a utility method that will create a new "colorized"
image from a grayscale image using imaging lingo.  I have tested various
inks, but have not yet succeeded at accomplishing the exact look I want.
Specifically, I would like it to behave like a Photoshop Color Overlay  i.e.
black stays black and white stays white and everything else is a shade of
the color specified with middle gray being the exact color specified.

Here is my code as of now:

on changeColor color, sGrayscaleMem, sDestinationMem

    tempImage = member(sGrayscaleMem).image.duplicate()
    tempImage.useAlpha = FALSE

    dRect = tempImage.rect
    sRect = tempImage.rect

    member(sDestinationMem).image.copyPixels(tempImage, dRect, sRect, [#ink
: #lighten, #color: color])

end changeColor

This sorta works in that the lighten ink will convert white to white, but it
converts black to the specified color.  Using the darken ink will have the
opposite effect.

Any suggestions?

Anthony
www.lifelinestudios.com


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to