|
@@ 532-537 (lines=6) @@
|
| 529 |
|
|
| 530 |
|
// encoded mode - the first byte specifies the number of consecutive pixels |
| 531 |
|
// to be drawn using the color index contained in the second byte. |
| 532 |
|
for ($i = 0; $i < $firstbyte; $i++) { |
| 533 |
|
$col = $pixelcounter % $thisfile_bmp_header_raw['width']; |
| 534 |
|
$row = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']); |
| 535 |
|
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$secondbyte]; |
| 536 |
|
$pixelcounter++; |
| 537 |
|
} |
| 538 |
|
|
| 539 |
|
} |
| 540 |
|
} |
|
@@ 621-626 (lines=6) @@
|
| 618 |
|
// pixels specified by the first byte have been drawn. |
| 619 |
|
$paletteindexes[0] = ($secondbyte & 0xF0) >> 4; |
| 620 |
|
$paletteindexes[1] = ($secondbyte & 0x0F); |
| 621 |
|
for ($i = 0; $i < $firstbyte; $i++) { |
| 622 |
|
$col = $pixelcounter % $thisfile_bmp_header_raw['width']; |
| 623 |
|
$row = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']); |
| 624 |
|
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindexes[($i % 2)]]; |
| 625 |
|
$pixelcounter++; |
| 626 |
|
} |
| 627 |
|
|
| 628 |
|
} |
| 629 |
|
} |