ajout des chroniques dans about.php

This commit is contained in:
2020-01-06 14:43:25 +01:00
parent fc231ee294
commit ec01340aa7
2 changed files with 11 additions and 10 deletions

View File

@@ -13,17 +13,17 @@ $height = imagesy($block_image);
$img=imagecreatetruecolor( $width, $height );
// enable alpha blending on the destination image.
imagealphablending($img, true);
imagealphablending($img, false);
imagesavealpha($img,true);
// Allocate a transparent color and fill the new image with it.
// Without this the image will have a black background instead of being transparent.
$transparent = imagecolorallocatealpha( $img, 255, 255, 255, 127 );
imagefill( $img, 0, 0, $transparent );
//$transparent = imagecolorallocatealpha( $img, 255, 255, 255, 127 );
//imagefill( $img, 0, 0, $transparent );
// copy the thumbnail into the output image.
imagecopyresampled($img,$block_image, 0, 0, 0, 0, $width, $height, $width, $height );
imagedestroy($block_image);
// imagecopyresampled($img,$block_image, 0, 0, 0, 0, $width, $height, $width, $height );
if ($alea < 1000)
{
@@ -37,13 +37,13 @@ if ($alea < 1000)
$superpose = @imagecreatefrompng($files[0]);
//imagecopymerge($img, $superpose, 0, 0, 0, 0, $width, $height, 50);
imagecopyresampled($img,$superpose, 0, 0, 0, 0, $width, $height, imagesx($superpose), imagesy($superpose));
imagedestroy($superpose);
}
imagealphablending($img, false);
imagesavealpha($img,true);
imagecopymerge($img, $block_image, 0, 0, 0, 0, $width, $height, 45);
// ---
// --- envoyer l'image au navigateur
@@ -52,5 +52,6 @@ header("Content-Type: image/png");
imagepng($img);
imagedestroy($img);
imagedestroy($block_image);
?>