PNG images are not supported for channels and getimagesize() bits. However, to get these values, you can use a small function: get_png_imageinfo() :
$file = 'Klee_-_Angelus_Novus.png'; $info = get_png_imageinfo($file); print_r($info);
Gives you an example image:
Array ( [bit-depth] => 4 [bits] => 4 [channels] => 1 [color] => 3 [color-type] => Indexed-colour [compression] => 0 [filter] => 0 [height] => 185 [interface] => 0 [width] => 291 )
It returns channels and bits, and some of them would expect from getimagesize() along with additional information related to the PNG format. The meaning of the values ββnext to the bits and channels is documented in the PNG specification .
hakre source share