开发者

PHP GD inappropriate transparancy [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

When i cr开发者_如何学Copped a png image using php gd library it cropped in a strange way. As it is partially cropped. I think the transparency is not working properly.

Here is my code

      imagesavealpha($this->image, true);
      $bg = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
      imagefill($this->image, 0, 0, $bg);
      imagepng($this->image,$filename);


Sounds like you like you are giving your new image the wrong size.

How do you crop the image? imagecopyresampled? http://php.net/manual/en/function.imagecopyresampled.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜