I am looking to apply a color tint across a series of thumbnails.
For example, 50 images which transition from red to blue from 1-50.
Can anyone set me in the right path?
Moderators: macek, egami, gesf

//SET THIS!
//How visible will the tint be?
//In this case, 25%
$pct = 25;
$height = 32
$width = 32;
for($i=0;$i<=50;$i++){
//The thumbnail
$original = imagecreatefromjpg("images/image" . $i . ".jpg");
//Initialize the overlay tint
$overlay = imagecreatetruecolor($width, $height);
//Increment integer
$inc = 255 / 50;
//Fade
$red = 255 - ($inc * $i);
$blue = $inc;
$original = imagecopymerge($original, $overlay, 0, 0, 0, 0, $width, $height, $pct);
}

Return to PHP coding => Images
Users browsing this forum: No registered users and 1 guest