2017-05-31 212 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 –