RGBSurface.Transform Method
Applies a one-to-one pixel transformation to all pixels of an RGBSurface. You specify the transformation via either three lookup tables, RedMap, GreenMap, and BlueMap, or one lookup table to apply to all three channels.
Syntax
RGBSurface.Transform Map()
RGBSurface.Transform RedMap(), GreenMap(), BlueMap()
Parameters | |
Map() |
|
RedMap() |
|
GreenMap() |
|
BlueMap() |
Each map parameter is an 256 element array of integers. The transformation works as follows: For each pixel, the pixel's RGB value is used as an index into the map arrays and the value found becomes the new R, G, or B value for the pixel.
For example, if you set up a map such that map(i)=255-i, then calling Transform(Map) will invert the image.