-2

How do I retrieve the Alpha Channel from an image using PHP?

Kev
  • 118,037
  • 53
  • 300
  • 385

1 Answers1

3

By Imagick::getImageAlphaChannel()

(Answer quality about as poor as question. Or maybe better - it has a link to the manual)

mkilmanas
  • 3,395
  • 17
  • 27
  • I lol'd. Note that GD can save Alpha detail, but can't really manipulate it as a channel. – Emyr Jun 15 '11 at 08:33
  • Thank you. How can get "bit depth" from an image in PHP, not using Imagick. – user799173 Jun 15 '11 at 08:36
  • That's a whole new question, which could probably be anserwed by [`getimagesize()` returned `bits` value](http://lt.php.net/manual/en/function.getimagesize.php) – mkilmanas Jun 15 '11 at 08:41
  • I also tried getimagesize() which gives you a "bits" value, but it was always 8 for image 8, 24, 32 bit depth. – user799173 Jun 15 '11 at 08:59