My problem is, I want to add an image of 3 image, first there is a yellow background, then I use PHP and GD To write some text on this, the text is black, so I made it transparent in the next phase, then I want to keep that picture on the background picture, so the text is textured on it. It works fine, if I upload PNG from my computer built in GIMP, but there is transparency on the picture created with GD, but the result is a yellow background with black letters again.
How should this be?
What is the code I am getting now from:
How does it come with an image made from GD now?
& lt ;? Php header ('content-type: image / png'); $ Title = "Puluania"; $ Im = imagecreatetruecolor (1200, 320); // $ im = imagecreatetruecolor (1200, 320); $ White = imagecolorallocate ($ im, 255, 255, 255); $ Crna = imagecolorallocate ($ im, 0, 0, 0); $ Black = imagecolorallocatealpha ($ im, 255, 255, 255, 127); $ Yellow = imagecolorallocate ($ im, 251, 18, 8); // External Bracket South Poseidon ImageFilm ($ im, 0, 0, yellow $); $ Font = "/ alrightites-ultra-v3.ttf"; // Dodajam Text to Jattu Pozdinu ImageText ($ im, 122, 0, 40, 160, $ crna, $ font, $ title); // Kriarum Slim Krani Text Najetos Possadini Imaging ($ im, 'sl.png'); Imagedestroy ($ im); // Ovaz Dio Bi Trebao Napervicae Dr. Karen Slova Postnu Projorna $ image = imagecreatefrompng ('sl.png'); $ Odabirprozirne = imagecolorallocatealpha ($ image, 0, 0, 0, 127); Imagealphobalending ($ image, true); Imagecolortransparent ($ image, $ odabirprozirne); Imagepng ($ image, 'sl114.png'); Imagedestroy ($ image); / * Dodaj zvijezed AudiĊĦipod * / $ image_1 = imagecreatefrompng ('TexturaZvijezde.png'); $ Image_2 = imagecreatefrompng ('sl114.png'); Image swords ($ image_1, true); ImageCopy ($ image_1, $ image_2, 0, 0, 0, 0, 1200, 120); Imagepng ($ IMAGE_1); Imagedestroy ($ IMAGE_1);
I did not test it, but according to the function's manual,
For example
No comments:
Post a Comment