XieQueryExport(3X) — Subroutines
Digital
NAME
XieQueryExport − This routine returns the LUT and a list of allocated color cells, if any, that were used during the export of an image.
C Format
XieQueryExport(pho_id, lut_id_ret, pxl_lst_ret, pxl_cnt_ret)
C Argument Information
XiePhoto pho_id;
XiePhotomap ∗lut_id_ret;
unsigned long ∗∗pxl_lst_ret;
unsigned long ∗pxl_cnt_ret;
RETURN VALUES
None.
PARAMETERS
pho_idThe pho_id argument specifies the identifier of the server image from which you want to obtain the ExportContext. The image can be an unbound photomap, a photoflo, a bound photomap, or a phototap. The photoflo is specified explicitly if the image is a photoflo, or implicitly if the image is a bound photomap or phototap. If the image is bound to a photoflo, the photoflo execution must be complete or the routine returns a BadAccess error.
lut_id_retThe lut_id_ret argument specifies the address of the location to which the routine returns the export LUT photomap identifier. If the ExportContext is not using a LUT, the routine returns a null. You can free the LUT photomap using the XieFreeResource routine.
pxl_lst_retThe pxl_lst_ret argument specifies the address of the location to which the routine returns the pointer to the list of allocated pixels. If you specify a null for either the pxl_lst_ret or the pxl_cnt_ret argument, the routine does not return a pixel list and all allocated pixels remain the property of the ExportContext. If the routine returns a pixel list, the list is removed from the ExportContext and the application is responsible for freeing the list using the XieFree routine.
pxl_cnt_retThe pxl_cnt_ret argument specifies the address of the location to which the routine returns the count of the allocated pixels. If you do not want a pixel list and a count of the allocated pixels, set this argument to null.
DESCRIPTION
This routine returns the LUT identifier and a list of allocated color cells, if any, that were used during the export of an image. The LUT could have been supplied by the application or generated by an XIE routine. The application is responsible for freeing the allocated pixels using the XFreeColors routine. For example:
XieExport( photo_id, window, gc, 0,0, 0,0, 100, 100, 0,
colormap, 0.0,0.0);
.
XieQueryExport( photo_id, &lut_id, &pixel_list, &pixel_count );
.
XieExport( photo_id, window, gc, 0,0, 0,0, 100, 100, lut_id,
colormap, 0.0,0.0);
.
XFreeColors( display, colormap, pixel_list, pixel_count, 0 );
pixel_list = XieFree( pixel_list );
lut_id = XieFreeResource( lut_id );
XIE Events and Error Messages
Protocol Messages: X_ieQueryExport
XIE event returned: None
XieLib errors: Reply error, BadLength
XieServer errors: BadIDChoice -- Invalid identifier
BadAlloc -- Insufficient server resources
BadAccess -- The photoflo is running