Hello,
I am trying to resize an png file, my autograph 😃
Good result thanks to gimp: http://boxfly.free.fr/test/test1.jpg
Bad result with php:
http://boxfly.free.fr/test/test2.jpg
This is my php code to resize the autograph:
$newAuto = imagecreatetruecolor( $widthImgAu, $heightImgAu) ;
imagecolortransparent($newAuto,imagecolorat($newAuto,0,0)) ;
$imgAuto = ImageCreateFromPNG($img_auto);
imagecopyresized($newAuto, $imgAuto, 0, 0, 0, 0, $widthImgAu, $heightImgAu, $imageInfoAu[0], $imageInfoAu[1]) ;
ImagePNG($newAuto,"new_auto.png");
What should I do more to resize an png image without loosing transaparence ?
Thanks.
PS: If I do not resize the png image, it's as perfect as gimp...