src/pix1.c
l_int32
pixSetColormap(PIX      *pix,
               PIXCMAP  *colormap)
{
    PROCNAME("pixSetColormap");

    if (!pix)
        return ERROR_INT("pix not defined", procName, 1);

    pixDestroyColormap(pix);
    pix->colormap = colormap;
    return 0;
}
/*!
 *  pixSetColormap()
 *
 *      Input:  pix
 *              colormap (to be assigned)
 *      Return: 0 if OK, 1 on error.
 *
 *  Notes:
 *      (1) Unlike with the pix data field, pixSetColormap() destroys
 *          any existing colormap before assigning the new one.
 *          Because colormaps are not ref counted, it is important that
 *          the new colormap does not belong to any other pix.
 */
pixSetColormap()
Input:  pix
colormap (to be assigned)
Return: 0 if OK, 1 on error.

(1) Unlike with the pix data field, pixSetColormap() destroys
any existing colormap before assigning the new one.
Because colormaps are not ref counted, it is important that
the new colormap does not belong to any other pix.
pixSetColormap () Input : pix colormap ( to be assigned ) Return : 0 if OK 1 on error . ( 1 ) Unlike with the pix data field pixSetColormap () destroys any existing colormap before assigning the new one . Because colormaps are not ref counted it is important that the new colormap does not belong to any other pix .
l_int32
pixSetColormap(PIX      *pix,
               PIXCMAP  *colormap)
{
    PROCNAME("pixSetColormap");
    if (!pix)
        return ERROR_INT("pix not defined", procName, 1);
    pixDestroyColormap(pix);
    pix->colormap = colormap;
    return 0;
}
l_int32 pixSetColormap ( PIX * pix , PIXCMAP * colormap ) { PROCNAME ( " " ) ; if ( ! pix ) return ERROR_INT ( " " , procName , 1 ) ; pixDestroyColormap ( pix ) ; pix -> colormap = colormap ; return 0 ; }
pixSetColormap()
      Input:  pix
              colormap (to be assigned)
      Return: 0 if OK, 1 on error.
pixSetColormap () Input : pix colormap ( to be assigned ) Return : 0 if OK 1 on error .