-1

Anybody who help me to solve a problem.
i have image which have transparent area left and right How to remove transparent area from picture using php.
crop(remove) transparent area from picture
Note : Gray color is Transparent actually. enter image description here

i want convert into this
enter image description here

M.Nadeem
  • 67
  • 7
  • 3
    Possible duplicate of [Remove Image background with php and save transparent png](https://stackoverflow.com/questions/10751227/remove-image-background-with-php-and-save-transparent-png) – Akhilesh B Chandran May 31 '17 at 05:49

1 Answers1

2

Checkout PHPs imagecropauto:

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

especially:

IMG_CROP_TRANSPARENT: Crops out a transparent background.

Documentation

moritzg
  • 4,266
  • 3
  • 37
  • 62