3.1.1.5.1.3 Images

An image resource represents a finite rectangular area that contains color information. The most common type of image is a bitmap, which is a simple two-dimensional array of pixel colors. However, an image can also be procedurally generated from a scene graph. In total, there are three image resources:

Bitmap: A reference to an actual surface containing color data. A bitmap has the following attributes:

Width: Pixel width.

Height: Pixel height.

Stride: Pixel stride.

Format: Pixel format (MilPixelFormat).

Dpix, and Dpiy: Horizontal and vertical DPI.

paleteCount: If the bitmap has a pallet, this is the number of entries in the pallet. This MUST be smaller than 256.

palletArray, pixelData: Bitmap pixels.

CachedVisualImage: This resource represents a bitmap that contains a rasterization of a visual tree. The rasterization is cached from frame to frame, such that if the contained visual tree does not change, then it does not need to be traversed in subsequent frames. The cached visual image has the following attributes:

ViewBox: A MilSize structure that holds the position and dimensions of the content in this cached visual image.

RealizationSize: A MilSize structure that holds the size, in pixels, of the intermediate render target used to realize this cached visual image. If this value is zero, the size of the ViewBox is used instead.

hViewBoxAnimation: A 32-bit unsigned integer. The value of this field has to be either set to zero or set to a valid resource handle referencing a resource of type TYPE_RECTRESOURCE. This optional resource animates the value of the ViewBox property.

hRealizationSizeAnimations: A 32-bit unsigned integer. The value of this field has to be either set to zero or set to a valid resource handle referencing a resource of type TYPE_SIZERESOURCE. This optional resource animates the value of the RealizationSize property.

hVisual: A 32-bit unsigned integer. The value of this field has to be either set to zero or set to a valid resource handle referencing a resource of type TYPE_VISUAL or TYPE_WINDOWNODE. This resource represents the root of the subtree whose rasterization is cached.

ViewboxUnits: A MilBrushMappingMode enumeration. Specifies whether the ViewBox field value is relative to the bounding box of the tile brush contents, or whether the value is absolute.

GDIBitmap: This is a bitmap that uses a logical surface handle to retrieve surface characteristics and pixels from a logical surface created by the [MS-RDPEDC] protocol. The GDIBitap resource has the following attributes:

hLusurface: A logical surface handle that is used to get surface size format and pixel data from the [MS-RDPEDC] protocol.

Margins: A MilWindowMargins structure. When the client is rendering this bitmap, only the pixels inside the margins can be used.