Jump to content

transparent png not so transparent??


bobinindia

Recommended Posts

I am trying to resize a png that was mage by gd.

When i resize it some of the bacground transparency seems to be lost.

<?php
$src_img = imagecreatefrompng($im);


$dst_img = imagecreatetruecolor($dest_x, $dest_y);
$tpc = imagecolorallocate($dst_img, 255,255,255);
imagecolortransparent($dst_img,$tpc);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_x, $dest_y, $width, $height);

 

$im is the png created by gd earlier.

 

Link to comment
https://forums.phpfreaks.com/topic/103383-transparent-png-not-so-transparent/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.