imagemapster

ImageMapster - dim image


I'm using the ImageMapster library and I want to use invert effect of selecting items. I want to dim all image (make image darker) except selected area. The selected area should be colorful as is.

How to do this?


Solution

  • There is an example of this effect on the web site here:

    http://www.outsharked.com/imagemapster/default.aspx?demos.html#fiddle

    Look under "Fiddle with it" and "Darken the image when someone first mouses over it and show the current area undarkened, e.g. the inverse of the usual behavior?"

    The technique used involves inserting a filter between ImageMapster's layers, and using altImage to use the original image as the highlight effect.

    ImageMapster creates several layers for its effects: your original image, then a canvas for the "selected" areas, then a canvas for the highlight area. If you add something between the original image and the first canvas, it will effectively darken the whole image. Then by using altImage to use the original image itself for the highlight effects, the net appearance is of everything except the highlighted area being darkened.