Read 1D/2D Run-Length Encoded Scan Line

\i D N r byte::prev_line_offset word::no_of_pixels

Parameter Type Range Description
prev_line_offset signed byte -8 ... 8 y-offset of scanline referred to (0 = none = 1D encoded)
no_of_pixels word 1 ... display width number of pixel to be scanned

Reads the color information of no_of_pixels pixels in a horizontal line from left to right, starting from the current cursor position and reports the data with run-length encoding.

Note

There is also a local 2D Run-Length Encoding Application Note version available which is named as 2D RLE Application Note.pdf, and can be found under the iLCD Manager XE installation path within the Documentation directory. Other useful pdf documents can be downloaded on the www.demmel.com/en/service/downloads.htm website.

Response: [ACK] no_of_bytes b0 ... [ACK]

Parameter Type Range Description
no_of_rle_bytes word 2 ... 2 * display width + display width / 32 + 2 length of encoded data in bytes
p0 ... bytes 0x00 ... 0xFF run-length encoded data

Response Example

[ACK][00][03][B1][00][F8][ACK]

In this example a line of 50 red pixels has been scanned. The encoded data consists of 3 bytes: 0xB1 indicates a horizontal repetition (bit 7 set) of 50 pixels and 0x00F8 is the 16-bit color value for pure red.

Not supported by: DPC3020, DPC2060, DPC10xx

See also:

Write 1D/2D Run-Length Encoded Scan Line
Read Scan Line
Write Scan Line
16-Bit Color Values