@@ 572-577 (lines=6) @@ | ||
569 | ||
570 | // encoded mode - the first byte specifies the number of consecutive pixels |
|
571 | // to be drawn using the color index contained in the second byte. |
|
572 | for ($i = 0; $i < $firstbyte; $i++) { |
|
573 | $col = $pixelcounter % $thisfile_bmp_header_raw['width']; |
|
574 | $row = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']); |
|
575 | $thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$secondbyte]; |
|
576 | $pixelcounter++; |
|
577 | } |
|
578 | } |
|
579 | } |
|
580 | break; |
|
@@ 657-662 (lines=6) @@ | ||
654 | // pixels specified by the first byte have been drawn. |
|
655 | $paletteindexes[0] = ($secondbyte & 0xF0) >> 4; |
|
656 | $paletteindexes[1] = ($secondbyte & 0x0F); |
|
657 | for ($i = 0; $i < $firstbyte; $i++) { |
|
658 | $col = $pixelcounter % $thisfile_bmp_header_raw['width']; |
|
659 | $row = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']); |
|
660 | $thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindexes[$i % 2]]; |
|
661 | $pixelcounter++; |
|
662 | } |
|
663 | } |
|
664 | } |
|
665 | break; |