I am trying to make tiled image with using different images. After first tile, average color of first tile applied to another tile as filter. How can i use each tile picture
without filter?
My code is below;
<?php
$dest = imagecreatefrompng('myimage.png');
$src[] = imagecreatefrompng('otter.png');
$src[] = imagecreatefrompng('fox.png');
$src[] = imagecreatefrompng('opals.png');
// Copy and merge
for($i=0;$i<count($src);$i++){
imagecopymerge($dest, $src[$i], 32*$i, 0, 0, 0, 32, 32, 100);
}
// Output and free from memory
header('Content-Type: image/png');
imagepng($dest);
imagedestroy($dest);
for($ii=0;$ii<count($src);$ii++){
imagedestroy($src[$ii]);
}
?>
Sample tile link > http://7kitap.com/fox.png
Code link > http://7kitap.com/fillimage.php
As you will see on link above tile picture colors are changing after first tile.
Try using imagecreatetruecolor. Perhaps the colors from the first image are being used as the basis for the rest of them.