2.2.7.9 MILCMD_BITMAP_PIXELS

The MILCMD_BITMAP_PIXELS packet updates the contents of a bitmap resource. This message includes the bitmap image and an optional palette description, as specified by the imageBitmap and imagePalette fields, respectively.


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

messageSize

controlCode

targetResource

width

height

format

stride

offset

reserved

uiPaletteColorCount

dpiX

...

dpiY

...

imageBitmap (variable)

...

imagePalette (variable)

...

messageSize (4 bytes): A 32-bit unsigned integer. The total size, in bytes, of this message and its payload. The value of this field MUST be set to a number divisible by four and greater than or equal to 0x00000038.

controlCode (4 bytes): A 32-bit unsigned integer containing the control code for this message. The value of this field MUST be equal to 0x0000000E.

targetResource (4 bytes): A 32-bit unsigned integer. The value of this field MUST be set to a valid resource handle referencing a resource of type TYPE_BITMAPSOURCE. This handle identifies the resource that is the target for this message.

width (4 bytes): A 32-bit unsigned integer. The width of the bitmap image in pixels.

height (4 bytes): A 32-bit unsigned integer. The height of the bitmap image in pixels.

format (4 bytes): A MilPixelFormat enumeration. The pixel format of the bitmap image.

stride (4 bytes): A 32-bit unsigned integer. The distance, in bytes, between first pixels in consecutive rows of the bitmap image.

offset (4 bytes): A 32-bit unsigned integer. The distance, in bytes, between the first pixel in the first row of the bitmap image and the first byte of the payload following this message.

reserved (4 bytes): Reserved. MUST be ignored when received.

uiPaletteColorCount (4 bytes): A 32-bit unsigned integer. The number of entries in the palette. The value of this field MUST be less than or equal to 256.

dpiX (8 bytes): A 64-bit floating-point number. The horizontal DPI of the bitmap image.

dpiY (8 bytes): A 64-bit floating-point number. The vertical DPI of the bitmap image.

imageBitmap (variable): A variable-length array of 32-bit unsigned integers. The bitmap image pixels in the format specified by the format field. This field MUST be of size, in bytes, equal to value of the height field multiplied by the value of the stride field and then rounded up to an integer value divisible by four.

imagePalette (variable): A variable-length array of 32-bit unsigned integers. This field MUST be present if and only if the format of this bitmap image as specified by the format field is palletized. This field MUST be of size, in bytes, equal to the size of the palette as specified by the uiPaletteColorCount field times four.