2017-05-31 209 views
-1

任何能帮助我解决问题的人。
我有左右透明区域的图像 如何使用php从图片中删除透明区域。
作物(去除)图片中的透明区域
注意:灰色实际上是透明的。 enter image description here使用php删除透明区域(裁剪透明)使用php

我想转换成该
enter image description here

+3

的可能的复制[用PHP删除图像背景和保存透明PNG(https://stackoverflow.com/questions/10751227/remove-image-background-with-php-and-save -transparent-png) –

回答

2

结帐PHP的imagecropauto

resource imagecropauto (resource $image [, int $mode = -1 [, float $threshold = .5 [, int $color = -1 ]]]) 

尤其是:

IMG_CROP_TRANSPARENT:庄稼了一个透明的背景。

Documentation

+0

亲爱的兄弟我想裁剪图像使用PHP –