Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XieExport(3X) — OSF/1 X2.0-8 MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XieExport(3X)  —  Subroutines

Digital

NAME

XieExport − This routine exports an XIE image to an X11 drawable. 

C Format

XieExport(src_id, d, gc, sx, sy, dx, dy, w, h, lut_id, cmap_id, match, gray)

C Argument Information

XiePhoto     src_id;
Drawable     d;
GC        gc;
long       sx;
long       sy;
long       dx;
long       dy;
unsigned long  w;
unsigned long  h;
XiePhoto     lut_id;
Colormap     cmap_id;
double      match;
double      gray;

RETURN VALUES

None. 

PARAMETERS

src_idThe src_id argument specifies the source image.  If the source image is an unbound photomap, the operation is performed immediately. Otherwise, a processing element is appended to the specified photoflo with execution pending a call to the XieExecuteFlo routine. The photoflo is specified explicitly if the source image is a photoflo, or implicitly if the source image is a photomap or phototap bound to the photoflo. 

dThe d argument specifies the X11 drawable identifier returned by the XCreateWindow and XCreatePixmap routines. 

gcThe gc argument specifies the X11 graphics context identifier returned by the XCreateGC routine. 

sxThe sx argument specifies the x-coordinate of the upper left hand corner of the source image region you want to export. 

syThe sy argument specifies the y-coordinate of the upper left hand corner of the source image region you want to export. 

dxThe dx argument specifies the x-coordinate of the upper left hand corner of the X11 drawable region to hold the exported image. 

dyThe dy argument specifies the y-coordinate of the upper left hand corner of the X11 drawable region to hold the exported image. 

wThe w argument specifies the width in pixels of the source image region you want to export. 

hThe h argument specifies the height in scanlines of the source image region you want to export. 

lut_idThe lut_id argument specifies an optional photomap identifier of the LUT (lookup table) used to map the source image continuous-tone pixels to a client-allocated palette of colormap pixels. 

You can specify a 3-plane LUT (multispectral photomap) to simulate the direct color or true color visual classes. Each plane contains enough entries to satisfy the number of levels per component in the source image. 

You can specify a single-plane LUT (gray scale photomap) to simulate other visual classes. If the source image is multispectral, XIE accesses the LUT as follows:

pixel_index = ∗(LUT + red_value
          + green_value ∗ red_levels
          + blue_value ∗ red_levels ∗ green_levels)

If you specify a value for the lut_id argument, the routine ignores the cmap_id, match, and gray arguments. If the routine is performed within a photoflo, the lut_id photomap must be bound to the photoflo. 

cmap_idThe cmap_id specifies an optional colormap associated with the target X11 drawable and from which the routine allocates or matches, or both, continuous-tone image pixels. 

matchThe match argument specifies an optional granularity factor the routine uses for matching continuous-tone image pixels to the pseudocolor and gray scale visual class colormap pixel indices. The valid range is from 0.0 (use exact matches only) to 1.0 (use closest shareable pixel from the colormap). Values between the extremes result in a mix of shared pixels and new allocations. 

grayThe gray argument specifies an optional gray shade purity factor the routine uses for matching gray scale image pixels to the pseudocolor visual class colormap pixel indices.  The valid range is from 0.0 (use pure gray shades only) to 1.0 (use closest shareable pixel from the colormap). Values between the extremes result in a mix of shared pixels and new allocations. 

DESCRIPTION

This routine exports an XIE image to an X11 drawable.  The routine creates an ExportContext and attaches it to the source image. The ExportContext contains information concerning the export request and the resources used. For example, the colormap pixels and the LUT the routine allocates to satisfy the request. If you issue similar export requests later, the information in the routine uses the ExportContext to expedite the request. See the XieFreeExport routine for more information about how to free the context and how to retrieve the list of allocated colormap indices. 

If the operation is performed immediately and you selected computation events using the XieSelectEvents routine, the routine adds an XieK_DisplayEvent to the X11 event queue when the routine is completed. 

XIE Events and Error Messages

Protocol Messages: X_ieExportImage

XIE event returned: XieK_DisplayEvent if execution is immediate and computation events selected

XieLib errors: None

XieServer errors: BadIDChoice -- Invalid identifier

BadAlloc -- Insufficient server resources

BadDrawable -- Invalid X11 drawable

BadGC -- Invalid graphics context

BadMatch -- The source image is not constrained, the graphics context is not compatible with the X11 drawable, the LUT has fewer levels than the source image, the LUT is not compatible with the X11 drawable levels, or the source image is not compatible with the X11 drawable

BadValue -- The height or width is less than or equal to 0

BadAccess -- The export is within a photoflo and the LUT is not bound to it or the export context is incorrectly used

BadColor -- Invalid colormap

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026