mapColorToBitmap Lab

What's Happening

WTBitmap::mapColorToBitmap() is not the easiest function to understand because it does not yield any visual results on its own.  Instead, it sets up references from one image to another which in turn can be copied into a third image.  The first image shown is our source image.  The second image is our color map.  Our third image is a copy of the second image - it is our destination image.  Once the source image is mapped onto the color map image with WTBitmap::mapColorToBitmap() we can call image3.copyRect (image2, 2); specifying the type "2" parameter which will copy image2 respecting what is mapped in the color map.

Key Methods Used

WTBitmap::copyRect, WTBitmap::mapColorToBitmap

Points to Remember