public static function identifyImage($filename)
    {
        $dpi = static::getImageDpi($filename);
        $data = [];
        $data['dpi_x'] = $dpi[0];
        $data['dpi_y'] = $dpi[1];

        // Sometimes it returns 10752, which is (WHY?!) 72 dpi
        if (10752 === $data['dpi_x']) {
            $data['dpi_x'] = 72;
        }
        if (10752 === $data['dpi_y']) {
            $data['dpi_y'] = 72;
        }

        $info = getimagesize($filename);
        $data['image_w'] = $info[0];
        $data['image_h'] = $info[1];
        $data['bits'] = $info['bits'];
        $data['channels'] = '';
        if (3 === $info['channels']) {
            $data['channels'] = 'RGB';
        }
        if (4 === $info['channels']) {
            $data['channels'] = 'CMYK';
        }

        return $data;
    }