Reference Manual: (offline | online) Quickstart: (offline | online)

im.Map

The im.Map function can be used in a simple way, like im.Recolor , to scale down or remove color components from the source image, or it can be used in a more complex way to totally remap the color of the source image.

Example

init:
    image cyan green = im.Map("cyan.png", bmap=im.ramp(0, 0))
    image eileen inverse = im.Map('9a_happy.png', rmap=im.ramp(255,0),
                                  gmap=im.ramp(255,0), bmap=im.ramp(255,0))

show cyan green at cyanpos with dissolve

"The im.Map operation lets us mess with the red, green,
 blue, and alpha channels of an image."
"In this case, we removed all the blue from the image,
 leaving only the green component of cyan."

e "Ever have that feeling you're a character in a horror movie?"

show eileen inverse with dissolve

e "Right now, all my colors are inverted."

show eileen happy with dissolve

e "Back to normal.
Reference Manual: (offline | online) Quickstart: (offline | online)