private function parseBmp(IconImage $entry, $data)
    {
        $bitmapInfoHeader = unpack(
            'LSize/LWidth/LHeight/SPlanes/SBitCount/LCompression/LImageSize/' .
            'LXpixelsPerM/LYpixelsPerM/LColorsUsed/LColorsImportant',
            substr($data, $entry->fileOffset, 40)
        );

        $entry->setBitmapInfoHeader($bitmapInfoHeader);

        switch ($entry->bitCount) {
            case 32:
            case 24:
                $this->parseTrueColorImageData($entry, $data);
                break;
            case 8:
            case 4:
            case 1:
                $this->parsePaletteImageData($entry, $data);
                break;
        }
    }
private function parseBmp(IconImage $entry, $data)
    {
        $bitmapInfoHeader = unpack(
            'LSize/LWidth/LHeight/SPlanes/SBitCount/LCompression/LImageSize/' .
            'LXpixelsPerM/LYpixelsPerM/LColorsUsed/LColorsImportant',
            substr($data, $entry->fileOffset, 40)
        );

        $entry->setBitmapInfoHeader($bitmapInfoHeader);

        switch ($entry->bitCount) {
            case 32:
            case 24:
                $this->parseTrueColorImageData($entry, $data);
                break;
            case 8:
            case 4:
            case 1:
                $this->parsePaletteImageData($entry, $data);
                break;
        }
    }
private function parseBmp ( IconImage $ entry , $ data ) { $ bitmapInfoHeader = unpack ( 'LSize/LWidth/LHeight/SPlanes/SBitCount/LCompression/LImageSize/' . 'LXpixelsPerM/LYpixelsPerM/LColorsUsed/LColorsImportant' , substr ( $ data , $ entry -> fileOffset , 40 ) ) ; $ entry -> setBitmapInfoHeader ( $ bitmapInfoHeader ) ; switch ( $ entry -> bitCount ) { case 32 : case 24 : $ this -> parseTrueColorImageData ( $ entry , $ data ) ; break ; case 8 : case 4 : case 1 : $ this -> parsePaletteImageData ( $ entry , $ data ) ; break ; } }
Handle icon image which is BMP formatted
@param IconImage $entry
@param string $data
Handle icon image which is BMP formatted