megahard
Mon 8th Dec '03, 7:49am
for some reason:
function display_counter_as_image()
{
if( $this->error == '' ){
// Make an image 100x20
$im = imagecreate(100, 20);
// Make the headers PNG
header('Content-type: image/png');
// Make the colors
$this->bgcolors = $this->hex2int( $this->userinfo->bgcolor );
$this->bgcolor = imagecolorallocate( $im, $this->bgcolors['r'], $this->bgcolors['g'], $this->bgcolors['b'] );
$this->fontcolors = $this->hex2int( $this->userinfo->fontcolor );
$this->fontcolor = imagecolorallocate( $im, $this->fontcolors['r'], $this->fontcolors['g'], $this->fontcolors['b'] );
/////////////////////////////////////////////////////////// This Line //////////////////
imagecopymerge( $im, './small_images/counter_logo.gif', 0, 0, 0, 0, 23, 7, 0 );
//////////////////////////////////////////////////////////////////////////////////
imagettftext ( $im, 10, 0, 32, 15, $this->fontcolor, './verdana.ttf', $this->userinfo->hits);
imagepng( $im );
imagedestroy($im);
}
}
everything works apart from the line highlighted
what am I doing wrong?
I want a little logo 23x7 to appear on the left of the image being created
function display_counter_as_image()
{
if( $this->error == '' ){
// Make an image 100x20
$im = imagecreate(100, 20);
// Make the headers PNG
header('Content-type: image/png');
// Make the colors
$this->bgcolors = $this->hex2int( $this->userinfo->bgcolor );
$this->bgcolor = imagecolorallocate( $im, $this->bgcolors['r'], $this->bgcolors['g'], $this->bgcolors['b'] );
$this->fontcolors = $this->hex2int( $this->userinfo->fontcolor );
$this->fontcolor = imagecolorallocate( $im, $this->fontcolors['r'], $this->fontcolors['g'], $this->fontcolors['b'] );
/////////////////////////////////////////////////////////// This Line //////////////////
imagecopymerge( $im, './small_images/counter_logo.gif', 0, 0, 0, 0, 23, 7, 0 );
//////////////////////////////////////////////////////////////////////////////////
imagettftext ( $im, 10, 0, 32, 15, $this->fontcolor, './verdana.ttf', $this->userinfo->hits);
imagepng( $im );
imagedestroy($im);
}
}
everything works apart from the line highlighted
what am I doing wrong?
I want a little logo 23x7 to appear on the left of the image being created