Hi everyone, In PHP code, given an .png image path, I need to detect the bit-depth of that image. How can I do that? I've tried to use getImageSize() and read the bits as below sample code but it always returns '8' for 24-bits/32-bits image. Please help. class Utils { //Ham de lay bits cua image public static function getBits($image) { $info = getImageSize($image); return $info['bits']; } } Hope to hear from all of you! Regards, Nam. p.s I also post this issue on stackoverflow.com which is here<http://stackoverflow.com/questions/6355692/how-to-php-get-bit-depth-of-a-given-png-image-file> .