http://www.w3.org/TR/html4/loose.dtd">
|
StdGUI Image Functions |
|
IMAGE *create_image(int p_width, intp_height); void delete_image(IMAGE *p_img); IMAGE *clone_image(IMAGE *p_img); IMAGE *scale_image(IMAGE *p_img, int p_width, int p_height); IMAGE *crop_image(IMAGE *p_img, int p_x, int p_y, int p_width, int p_height); int get_pixel(IMAGE *p_img, int p_x, int p_y, COLOR *p_color); int set_pixel(IMAGE *p_img, int p_x, int p_y, COLOR p_color); int flood_fill(IMAGE *p_img, int p_x, int p_y, COLOR p_color); int blend_image(IMAGE *p_dst, int p_x, int p_y, IMAGE *p_src, IMAGE *p_msk); |
|
The create_image() function creates a new in-memory image of the specified size (p_width and p_height). The delete_image() frees the memory associated with an image created by the create_image(), clone_image(), scale_image() or crop_image() functions. The clone_image() function creates a duplicate of the image passed in the p_img parameter. The scale_image() function create a new image whose pixels are pased on the provided image (p_img) but with new dimensions (p_width and p_height). The crop_image() function creates a new image that contains a rectangular subset (p_x, p_y, p_width and p_height) of the image specified in p_img. The get_pixel() function returns the color value (in p_color) of the pixel at the specified location (in p_x and p_y). The set_pixel() function sets the color value (in p_color) of the pixel at the specified location (in p_x and p_y). The flood_fill() function fills a contiguous region of color in the destination image (p_img) with a new color (p_color), starting at a specified pixel (p_x, p_y). The blend_image() function blends a source image (p_src) into the destination image (p_dst) using a mask image (p_msk) as pixel-by-pixel alpha values. The source image and mask image are offset into the destination image by a specified pixel position (p_x, p_y). |
|
The create_image() function returns a valid pointer to a new image structure on success, NULL on failure. The clone_image(), scale_image() and crop_image() functions return a valid pointer to a new image on success, NULL on failure. The get_pixel(), put_pixel(), flood_fill() and blend_image() functions return zero (0) on success, non-zero on failure. |
|
Jeffrey Dutky |