0 Replies - 613 Views - Last Post: 30 September 2009 - 01:57 PM Rate Topic: -----

#1 ktalebian  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 79
  • Joined: 08-April 08

Creating Image with PHP Issues

Posted 30 September 2009 - 01:57 PM

Hi there,

I've just started learning this creating images with PHP, and I'm having a problem:
I have this background image, that is basically an 100x100 image size, with a small banner on the top left. The entire page is transparent, and the banner on the top left, has different numbers on it.
So I thought it might be easier to use PHP to create these; I would just load the banner, and add a number to the position.
However, when I load the background with this command:

$im = imagecreatefrompng("/images/products/pID/pID.png");

The background changes from transparent to black!
After using this command
$black = imagecolorallocate($im, 0, 0, 0);
imagecolortransparent($im, $black);

to filter it out, it gives me a very bad filtering, with the banner looking all deformed!
Could someone please help me out?


Is This A Good Question/Topic? 0
  • +

Page 1 of 1