Functions
Image_api

Functions

unsigned int * GrPaletteConversion (const tContext *pContext, const tImage *pBitmap)
 
void GrImageDraw (const tContext *pContext, const tImage *pBitmap, int lX, int lY)
 

Detailed Description

Function Documentation

unsigned int* GrPaletteConversion ( const tContext pContext,
const tImage pBitmap 
)

Converts the bitmap image palette.

Parameters
pContextis a pointer to the drawing context to use.
pBitmapis a pointer to the image.

This function converts the palette of a bitmap image. The image palette is in 24 bit RGB form, and this function converts that to a format to be sent to the LCD using DpyColorTranslate function. The converted palette is contained in a global buffer while the original image palette remains unchanged.

Returns
is the address of the global buffer containing the converted palette.

References DpyColorTranslate, tImage::NumColors, tContext::pDisplay, and tImage::pPalette.

Referenced by GrImageDraw().

void GrImageDraw ( const tContext pContext,
const tImage pBitmap,
int  lX,
int  lY 
)

Draws a bitmap image.

Parameters
pContextis a pointer to the drawing context to use.
pucImageis a pointer to the image to draw.
lXis the X coordinate of the upper left corner of the image.
lYis the Y coordinate of the upper left corner of the image.

This function draws a bitmap image. The image may be 1 bit per pixel, 4 bits per pixel or 8 bits per pixel (using a palette supplied in the image data). It can be uncompressed data, or it can be compressed using several different compression types. Compression options are 4-bit run length encoding, 8-bit run length encoding, and a custom run length encoding variation written for complex 8-bit per pixel images.

Returns
None.

References tImage::BPP, DpyPixelDraw, DpyPixelDrawMultiple, GrPaletteConversion(), tContext::pDisplay, tImage::pPixel, tContext::sClipRegion, tRectangle::sXMax, tRectangle::sXMin, tRectangle::sYMax, tRectangle::sYMin, tImage::XSize, and tImage::YSize.


Copyright 2013, Texas Instruments Incorporated