Functions | |
INT16 | setup_image_display (INT16 width, INT16 height) |
void | exit_image_display (void) |
void | image_title (INT16 threshold, char *title) |
void | set_image_palette (INT16 ncolors, byte r[], byte g[], byte b[]) |
void | draw_image_line (INT16 width, INT16 line, INT16 totlines, byte *pixels) |
void draw_image_line | ( | INT16 | width, |
INT16 | line, | ||
INT16 | totlines, | ||
byte * | pixels | ||
) |
This function is called to supply the image line by line from top to bottom.
width | width of the picture. Essentially, number of bytes in pixels . |
line | current line of the image |
totlines | total number of lines in the image. This will always equal the height of the image. |
pixels | pixel data. |
Eg. Say we want to extract pixel at position (20,20) and print it out as rgb values.
void exit_image_display | ( | void | ) |
This is called to notify that all camera setup things are complete. Any resources that are allocated in setup_image_display can be released in this function.
void image_title | ( | INT16 | threshold, |
char * | title | ||
) |
This function is called to update any image title change.
threshold | if -1 the entire tile is in the title string otherwise, the threshold of the current image. |
title | if threshold is -1, the title contains the whole title for the image. Otherwise only the camera name is given. |
void set_image_palette | ( | INT16 | ncolors, |
byte | r[], | ||
byte | g[], | ||
byte | b[] | ||
) |
This function is called after setup_image_display and before the first call to draw_image_line. This is responsible to setup the palettes to display the camera image.
ncolors | number of colors in the palette. |
r | red component of rgb. |
g | blue component of rgb. |
b | green component of rgb. |
INT16 setup_image_display | ( | INT16 | width, |
INT16 | height | ||
) |
This function is responsible for initializing any resources that are required for camera setup.
width | width of the source image to expect. |
height | height of the source image to expect. |