Hi Everyone!
I want to use PNG-24 in GD so that I would get a better image quality.
My problem is that whenever I use PNG-24, the image that i try to call using "imagecreatefrompng" becomes a different image. Also, the image that I use has a transparent background but whenever I use the PNG-24 image, the background becomes white.

However in using a PNG-8 image, I don't encounter these two problems.

Below are the images that I used
PNG-8 (the original look of the image)

PNG-24

As can be seen above, the PNG-24 is totally different from the PNG-8. Please help!
Btw I am currently using PHP 5.

    This is the code that I used:

    $background = imagecreatetruecolor(76,84);

    $image = imagecreatefrompng("bronze/1-plateborder.png");
    $width_x = imagesx($image);
    $height_y = imagesy($image);
    imagecopymerge($background,$image,0,0,0,0,$width_x,$height_y,100);
    imagedestroy($image);

    imagepng($background);
    imagedestroy($background);

    Thank you for trying to help me. I really appreciate it.

      Write a Reply...