Indicate to the generator that the amount may change. This enables it to
improve performance considerably.
public int transformColor(int color)
Transform an individual color using the colorMap.
Preserves the input color's transparency or alpha channel.
Note it is not so efficient to call this for thousands of colors per
transformed color using colorMap.
public void transformPixels(int pixels)
Called by ColorBlindness routine to transform every pixel in the pixel
Alters pixels in place.
This does not support transparency. The transformed colors will have 0xFF
as the alpha channel, regardless of what the value was in the original
public processing.core.PImage transformPImage(processing.core.PImage img)
Copy an arbitrary PImage object and transform it using the colorMap.
Original image is unaltered.
Unlike transformPixels, this supports transparency. The transformed
colors will have the same alpha channel as the original image.
Maintaining the alpha channel makes this noticeably slower, but that's OK
because this should be called only once for an image, not once per frame.
If you want faster performance and don't care about the alpha channel,
use transformPixels(img.pixels) instead.