This function loads the image file specified by path and draws the image at the specified location on the drawable. Supported image types include GIF, JPEG, Windows BMP, PNG, XPM and both ASCII and binary variants of PBM, PGM and PPM.
![]() | The actual image types supported by the Nano-X server depend on the image types that were compiled in at microwindows/nano-X library build time. |
![]() | Filename extensions are irrelevant. The algorithm examines the magic numbers in the file's header to determine the image type. |
Type | Name | Description |
---|---|---|
GR_DRAW_ID | id | The ID of the drawable to draw the image onto. |
GR_GC_ID | gc | The ID of the graphics context to use when drawing the image. |
GR_COORD | x | The X coordinate to draw the image at. |
GR_COORD | y | The Y coordinate to draw the image at. |
GR_SIZE | width | The width to scale the image to. |
GR_SIZE | height | The height to scale the image to. |
char* | path | A string containing the filename of the file to load. |
int | flags | Flags based of the specific image type. Currenly flags is only used for loading JPEG files. If set to TRUE the JPEG will be loaded in "fast grayscale" mode. If set to FALSE the image will be drawn in RGB color mode. |