2.2.9.1.1.3.1.2.2 Bitmap Data (TS_BITMAP_DATA)

The TS_BITMAP_DATA structure wraps the bitmap data for a screen area rectangle containing a clipping taken from the server-side screen frame buffer.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

destLeft

destTop

destRight

destBottom

width

height

bitsPerPixel

flags

bitmapLength

bitmapComprHdr (optional)

...

...

bitmapDataStream (variable)

...

destLeft (2 bytes): A 16-bit, unsigned integer. Left bound of the rectangle.

destTop (2 bytes): A 16-bit, unsigned integer. Top bound of the rectangle.

destRight (2 bytes): A 16-bit, unsigned integer. Inclusive right bound of the rectangle.

destBottom (2 bytes): A 16-bit, unsigned integer. Inclusive bottom bound of the rectangle.

width (2 bytes): A 16-bit, unsigned integer. The width of the rectangle.

height (2 bytes): A 16-bit, unsigned integer. The height of the rectangle.

bitsPerPixel (2 bytes): A 16-bit, unsigned integer. The color depth of the rectangle data in bits-per-pixel.

flags (2 bytes): A 16-bit, unsigned integer. The flags describing the format of the bitmap data in the bitmapDataStream field.

Flags

Meaning

BITMAP_COMPRESSION

0x0001

Indicates that the bitmap data is compressed. The bitmapComprHdr field MUST be present if the NO_BITMAP_COMPRESSION_HDR (0x0400) flag is not set.

NO_BITMAP_COMPRESSION_HDR

0x0400

Indicates that the bitmapComprHdr field is not present (removed for bandwidth efficiency to save 8 bytes).

bitmapLength (2 bytes):  A 16-bit, unsigned integer. The size in bytes of the data in the bitmapComprHdr and bitmapDataStream fields.

bitmapComprHdr (8 bytes): Optional Compressed Data Header structure (section 2.2.9.1.1.3.1.2.3) specifying the bitmap data in the bitmapDataStream. This field MUST be present if the BITMAP_COMPRESSION (0x0001) flag is present in the flags field, but the NO_BITMAP_COMPRESSION_HDR (0x0400) flag is not.

bitmapDataStream (variable): A variable-length array of bytes describing a bitmap image. Bitmap data is either compressed or uncompressed, depending on whether the BITMAP_COMPRESSION flag is present in the flags field. Uncompressed bitmap data is formatted as a bottom-up, left-to-right series of pixels. Each pixel is a whole number of bytes. Each row contains a multiple of four bytes (including up to three bytes of padding, as necessary). Compressed bitmaps not in 32 bpp format are compressed using Interleaved RLE and encapsulated in an RLE Compressed Bitmap Stream structure (section 2.2.9.1.1.3.1.2.4), while compressed bitmaps at a color depth of 32 bpp are compressed using RDP 6.0 Bitmap Compression and stored inside an RDP 6.0 Bitmap Compressed Stream structure ([MS-RDPEGDI] section 2.2.2.5.1).