Monday, January 5, 2015

avoid black background of resize image of png extention

if($info['mime'] == 'image/png'){
                                                                imagefilledrectangle($tmp, 0, 0, $newwidth, $newheight, imagecolorallocate($tmp, 255, 255, 255));
                                                                imagefilledrectangle($tmp2, 0, 0, $newwidth2, $newheight2, imagecolorallocate($tmp2, 255, 255, 255));
                                                                }
                                                                    imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

No comments:

Post a Comment