note 105160 deleted from function.imagecreatefromjpeg by danbrown
| From: | danbrown@php.net | Date: | Mon, 01 Aug 2011 13:48:38 +0000 |
| Subject: | note 105160 deleted from function.imagecreatefromjpeg by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182052@lists.php.net to get a copy of this message | ||
Note Submitter: Lordicon
----
I am trying to make a custom forum signature where the information for the image being created is
pulled from another site using a class. Everything works great but what I want to do is take the
images I am pulling and make them clickable image links with alts and titles. Here is what I have so
far and this works I just cant figure out how to make the images clickable.
<?php
header("Content-type: text/html");
require_once("/home/nighting/public_html/bloodbath/links/clearbricks/_common.php");
$__autoload['GamerCard'] =
"/home/nighting/public_html/bloodbath/links/class.gamercard.php";
$GamerCard = new GamerCard('Lordicon');
$image = imagecreatefrompng("../abstract.png/1.png");
$font_black = imagecolorallocate($image, 2, 1, 8);
$font_blue = imagecolorallocate($image, 25, 0, 255);
$font_red = imagecolorallocate($image, 255, 0, 0);
$font_white = imagecolorallocate($image, 255, 255, 255);
$font_orange = imagecolorallocate($image, 235, 84, 9);
$score = $GamerCard->GamerScore;
$gameimage0 = imagecreatefromjpeg(''.$GamerCard->Games[0].'');
imagecolortransparent($gameimage0,imagecolorat($gameimage0,0,0));
$gameimage0_x = imagesx($gameimage0);
$gameimage0_y = imagesy($gameimage0);
$gameimage1 = imagecreatefromjpeg(''.$GamerCard->Games[1].'');
imagecolortransparent($gameimage1,imagecolorat($gameimage1,0,0));
$gameimage1_x = imagesx($gameimage1);
$gameimage1_y = imagesy($gameimage1);
$gameimage2 = imagecreatefromjpeg(''.$GamerCard->Games[2].'');
imagecolortransparent($gameimage2,imagecolorat($gameimage2,0,0));
$gameimage2_x = imagesx($gameimage2);
$gameimage2_y = imagesy($gameimage2);
$gameimage3 = imagecreatefromjpeg(''.$GamerCard->Games[3].'');
imagecolortransparent($gameimage3,imagecolorat($gameimage3,0,0));
$gameimage3_x = imagesx($gameimage3);
$gameimage3_y = imagesy($gameimage3);
$gameimage4 = imagecreatefromjpeg(''.$GamerCard->Games[4].'');
imagecolortransparent($gameimage4,imagecolorat($gameimage4,0,0));
$gameimage4_x = imagesx($gameimage4);
$gameimage4_y = imagesy($gameimage4);
imagestring($image, 5, 475, 15, $score, $font_white);
imagecopymerge($image, $gameimage0, 333, 69, 0, 0, $gameimage0_x, $gameimage0_y, 100);
imagecopymerge($image, $gameimage1, 377, 69, 0, 0, $gameimage1_x, $gameimage1_y, 100);
imagecopymerge($image, $gameimage2, 421, 69, 0, 0, $gameimage2_x, $gameimage2_y, 100);
imagecopymerge($image, $gameimage3, 465, 69, 0, 0, $gameimage3_x, $gameimage3_y, 100);
imagecopymerge($image, $gameimage4, 509, 69, 0, 0, $gameimage4_x, $gameimage4_y, 100);
imagepng($image);
imagedestroy($image);
?>