Bonjour à tous !
Je chercher un script php pour créer une image avec son reflet dans la partie inférieure.J'ai trouvé un script, il génère le reflet mais j'aimerais avoir son image qui apparais au dessus

Je ne suis pas du tout un habitué de la librairie GD, voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
<?php
$imgName = $src;
$size = getimagesize("$imgName");  
$imgImport = imagecreatefromjpeg($imgName);
$imgName_w = $size[0];
$imgName_h = $size[1];
$gradientHeight = 100; 
// Create new blank image with sizes.
$background = imagecreatetruecolor($imgName_w, $gradientHeight);  
$gradientColor = "255 255 255"; //White
$gradparts = explode(" ",$gradientColor); // get the parts of the  colour (RRR,GGG,BBB)
$dividerHeight = 1;  
 
$gradient_y_startpoint = $dividerHeight;
$gdGradientColor=ImageColorAllocate($background,$gradparts[0],$gradparts[1],$gradparts[2]);  
 
$newImage = imagecreatetruecolor($imgName_w, $imgName_h);
for ($x = 0; $x < $imgName_w; $x++) {
 
    for ($y = 0; $y < $imgName_h; $y++)
    {
    imagecopy($newImage, $imgImport, $x, $imgName_h - $y - 1, $x, $y, 1, 1);
    }
}
// Add it to the blank background image
imagecopymerge ($background, $newImage, 0, 0, 0, 0, $imgName_w, $imgName_h, 100);  
//create from a the image so we can use fade out.
$gradient_line = imagecreatetruecolor($imgName_w, 1);
 
// Next we draw a GD line into our gradient_line
imageline ($gradient_line, 0, 0, $imgName_w, 0, $gdGradientColor);
 
 
$i = 0;
$transparency = 30; //from 0 - 100
 
    while ($i < $gradientHeight) //create line by line changing as we go
    {
        imagecopymerge ($background, $gradient_line, 0,$gradient_y_startpoint, 0, 0, $imgName_w, 1, $transparency);
 
        ++$i;
        ++$gradient_y_startpoint;
 
                if ($transparency == 100) {
 
                    $transparency = 100;
 
                }
                else 
                {
                             // this will determing the height of the
                                     //reflection. The higher the number, the smaller the reflection. 
                                     //1 being the lowest(highest reflection)
                    $transparency = $transparency + 1; 
 
                }
 
    }  
 
	header("Content-type: image/jpeg");
 
// Set the thickness of the line we're about to draw
imagesetthickness ($background, $dividerHeight);
 
// Draw the line
imageline ($background, 0, 0, $imgName_w, 0, $gdGradientColor);  
imagejpeg($background, '', 100); //100 being the quality of image 100 Max(Best)
imagedestroy($background);
imagedestroy(gradient_line);
imagedestroy(newImage);  
 
?>
Quelqu'un aurais une idée de la modification à apporter pour avoir le total ?