@@ 539-548 (lines=10) @@ | ||
536 | $pixeldataoffset = strlen($BMPpixelData); // force to exit loop just in case |
|
537 | break; |
|
538 | ||
539 | case 2: |
|
540 | // delta - The 2 bytes following the escape contain unsigned values |
|
541 | // indicating the horizontal and vertical offsets of the next pixel |
|
542 | // from the current position. |
|
543 | $colincrement = $this->LittleEndian2Int(substr($BMPpixelData, $pixeldataoffset++, 1)); |
|
544 | $rowincrement = $this->LittleEndian2Int(substr($BMPpixelData, $pixeldataoffset++, 1)); |
|
545 | $col = ($pixelcounter % $thisfile_bmp_header_raw['width']) + $colincrement; |
|
546 | $row = ($thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width'])) - $rowincrement; |
|
547 | $pixelcounter = ($row * $thisfile_bmp_header_raw['width']) + $col; |
|
548 | break; |
|
549 | ||
550 | default: |
|
551 | // In absolute mode, the first byte is zero and the second byte is a |
|
@@ 611-620 (lines=10) @@ | ||
608 | $pixeldataoffset = strlen($BMPpixelData); // force to exit loop just in case |
|
609 | break; |
|
610 | ||
611 | case 2: |
|
612 | // delta - The 2 bytes following the escape contain unsigned values |
|
613 | // indicating the horizontal and vertical offsets of the next pixel |
|
614 | // from the current position. |
|
615 | $colincrement = $this->LittleEndian2Int(substr($BMPpixelData, $pixeldataoffset++, 1)); |
|
616 | $rowincrement = $this->LittleEndian2Int(substr($BMPpixelData, $pixeldataoffset++, 1)); |
|
617 | $col = ($pixelcounter % $thisfile_bmp_header_raw['width']) + $colincrement; |
|
618 | $row = ($thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width'])) - $rowincrement; |
|
619 | $pixelcounter = ($row * $thisfile_bmp_header_raw['width']) + $col; |
|
620 | break; |
|
621 | ||
622 | default: |
|
623 | // In absolute mode, the first byte is zero. The second byte contains the number |