开发者

Image Resize with constraint proportion and tranparancy

How do开发者_如何学C i resize image preserving its dimension ratio proportion and transparancy in php


Use the GD library from MicroMVC. It's the smallest, fastest GD lib out there.


The function you want is called imagecopyresampled(); don't forget to only use true color images for destinations. Here is a comment which talks specifically about preserving transparency: http://www.php.net/manual/en/function.imagecopyresampled.php#93166 (note the usage of the imagecolorallocatealpha() function)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜