It would be nice if tint() could be applied to a PImage, but it seems to work only on a PGraphics.
A solution I found is to simulate the tint (actually, just the add transparency part) manually:
Code:final String PATH = "D:/_PhiLhoDocs/Images/";
final int IMAGE_NB = 5;
final color TINT = 255 / IMAGE_NB;
void setup()
{
noLoop();
PImage pi = loadImage(PATH + "HPIM1592.JPG");
AddTransparency(pi, TINT);
// Dimension to image size
size(pi.width, pi.height);
// Display whole image
image(pi, 0, 0);
pi = loadImage(PATH + "HPIM1593.JPG");
AddTransparency(pi, TINT);
blend(pi, 0, 0, pi.width, pi.height, 0, 0, pi.width, pi.height, LIGHTEST);
pi = loadImage(PATH + "HPIM1595.JPG");
AddTransparency(pi, TINT);
blend(pi, 0, 0, pi.width, pi.height, 0, 0, pi.width, pi.height, LIGHTEST);
pi = loadImage(PATH + "HPIM1597.JPG");
//AddTransparency(pi, TINT);
blend(pi, 0, 0, pi.width, pi.height, 0, 0, pi.width, pi.height, LIGHTEST);
pi = loadImage(PATH + "HPIM1598.JPG");
AddTransparency(pi, TINT);
blend(pi, 0, 0, pi.width, pi.height, 0, 0, pi.width, pi.height, LIGHTEST);
}
void AddTransparency(PImage pi, int transparency)
{
transparency <<= 24;
for (int i = 0; i < pi.width; i++)
{
for (int j = 0; j < pi.height; j++)
{
color c = pi.pixels[i + j * pi.width];
c = c & 0x00FFFFFF | transparency;
pi.pixels[i + j * pi.width] = c;
}
}
}