GSDP:GAM100/CProcessing/imageCreateTint()
From Inside
< GSDP:GAM100 | CProcessing
imageCreateTint()
Description
Returns a tinted copy of a PImage using an input PColor . You must have created the image using one of the advanced image functions and set the copyPixelData bool to be true.
Parameters
imageCreateTint(PImage srcImg, PColor tint)
Example
PImage justin_face;
PImage tinted_justin_face;
int x_size, y_size;
void init()
{
justin_face = loadImageAdvanced("./Assets/justin1.png", true, false);
tinted_justin_face = imageCreateTint(justin_face, color(255, 0, 0, 255));
x_size = imageWidth(justin_face);
y_size = imageHeight(justin_face);
}
float rotation = 0;
void update()
{
background(color(255, 255, 255, 255));
imageRotated(tinted_justin_face, mouseX, mouseY, 100, 150, 255, rotation);
rotation++;
}
Related
- Main Page
- loadImage()
- loadImageAdvanced()
- image()
- imageRotated()
- imageSize()
- imageMode()
- createImage()
- createImageAdvanced()
- freeImage()
- imageWidth()
- imageHeight()
- imagePixel()
- imageCreateSubimage()
- imageCreateSubimageAdvanced()
- imageCreateTint()
- imageCreateTintAdvanced()
- imageData()
- imageUpdate()
- readFrameBuffer()
- readFrameBufferAdvanced()