ImageResize

[ XITE Reference Manual | XITE home ]

Contents


Name

ImageResize, ImageByteResize, ImageOverlayResize, ImageSignedByteResize, ImageUnsignedShortResize, ImageShortResize, ImageLongResize, ImageFloatResize, ImageDoubleResize - Resize XITE Image (pixeltype-specific routines)

Syntax

 #include "imagePix.h"

 void ImageXxxxResize(ImageWidget wid, int x, int y,
    int width, int height);
 void ImageOverlayResize(ImageOverlayWidget wid, int x,
    int y, int width, int height);

Description

These functions resize the image of a particular pixeltype. They are called by the resize method (and thus also by the set_values method) of the Image widget supplied with the XITE distribution.

Images with three-primary colormaps are also handled (DirectColor and TrueColor 24-bit visuals).

Byte-order for pixmaps and bitmaps is defined by the X server, not the client. These functions handle swapping of the byte-order for 24-bit DirectCololor, 24-bit TrueColor and 1-bit StaticGray visuals. For 8- and 4-bit visual depths, no byte-swapping is necessary. The swapping could have been done by XPutImage, if necessary, but doing it in these functions requires no extra work.

One of these functions (depending on the pixeltype of the band at hand) should be called when any one of the following has changed:

- Widget instance variable scaletype
This determines linear lookup in colormap or thresholding

- Widget instance variables scalea or scaleb
These determine offset and inclination of linearity if scaletype implies linear lookup

- Widget instance variables minval or maxval
These determine the range used in linear lookup

- Widget instance variable colorcells
If less than 256, colors will be repeated cyclically because lookup indices will repeat cyclically

- Widget instance variable colorptr
Determines lookup indices

- Widget instance variable displaymethod
When switching between reduced color display and full-color display.

- Widget instance variables xptr or yptr
These tables determine transformation from image coordinates to screen window coordinates in the event that the image is zoomed or panned

- Widget instance variable resize
This is zero if no geometric transformation is necessary

- Widget instance variables xpan, ypan, zoom
These are determined by zoom and pan (and influence the geometric transformation tables)

- Overlay widget instance variables cells and colorptr
Determines lookup indices into colormap

See also

Image(3), ImageOverlay(3), ImageFormat(3)

Author

Otto Milvang

Revised

Svein Bøe

Doc

Svein Bøe

Id

$Id: ImageProtoPix.c,v 1.47 1997/03/24 11:29:10 svein Exp $