Convert from gcp_pixel(s) to gcp_*colors(s)
Name
gcpUnmapRGBAPixel, gcpUnpackRGBAPixels, gcpUnmapYUVPixel, gcpUnpackYUVPixels, gcpUnmapCMYKPixel, gcpUnpackCMYKPixels, gcpUnmapHSVPixel, gcpUnpackHSVPixels, gcpUnmapYCCPixel, gcpUnpackYCCPixels : Convert from gcp_pixel(s) to gcp_*colors(s)
Synopsis
#include <ggi/gcp.h> int gcpUnmapRGBAPixel(ggi_visual_t vis, gcp_pixel pixel,gcp_RGBAcolor *col); int gcpUnpackRGBAPixels(ggi_visual_t vis, void *buf,gcp_RGBAcolor *cols,int len); int gcpUnmapYUVPixel(ggi_visual_t vis, gcp_pixel pixel, gcp_YUVcolor *col); int gcpUnpackYUVPixels(ggi_visual_t vis, void *buf,gcp_YUVcolor *cols,int len); int gcpUnmapCMYKPixel(ggi_visual_t vis, gcp_pixel pixel, gcp_CMYKcolor *col); int gcpUnpackCMYKPixels(ggi_visual_t vis, void *buf,gcp_CMYKcolor *cols,int len); int gcpUnmapHSVPixel(ggi_visual_t vis, gcp_pixel pixel, gcp_HSVcolor *col); int gcpUnpackHSVPixels(ggi_visual_t vis, void *buf,gcp_HSVcolor *cols,int len); int gcpUnmapYCCPixel(ggi_visual_t vis, gcp_pixel pixel, gcp_YCCcolor *col); int gcpUnpackYCCPixels(ggi_visual_t vis, void *buf,gcp_YCCcolor *cols,int len);
Description
gcpUnmap*Pixel gets the color associated with the given pixelvalue.
gcpUnpack*Pixels converts the pixelvalues in buf to individual elements of cols. This function may be used to convert buffers output by the ggiGet{HLine,VLine,Box} functions from the pixelvalue representation to their actual colors as defined by gcp_color(3).
Try to cache the results of color lookups in your application for efficiency purposes.
Return value
gcpUnmap*Pixel and gcpUnpack*Pixels return 0 for OK, otherwise an gg-error(3) code.