Brief Index      Full Index      I.M. Reference

Show_Image


Functions

void Show_Image (HC_KEY key, float *x, float *y, float *z, char *format, int *width, int *height, const HC_PIXEL *data)
void Show_Image_Size (HC_KEY key, float *x, float *y, float *z, char *format, int *width, int *height)
void Show_Image_Name (HC_KEY key, char *name)
void Show_Partial_Image (HC_KEY key, int xpos, int ypos, int xlen, int ylen, const HC_PIXEL *data)
void DShow_Image (HC_KEY key, float *x, float *y, float *z, char *format, int *width, int *height, const HC_PIXEL *data)

Function Documentation

void Show_Image ( HC_KEY  key,
float *  x,
float *  y,
float *  z,
char *  format,
int *  width,
int *  height,
const HC_PIXEL *  data 
)

Returns the rectangular array of pixel data, as referenced by a key.

Parameters:
key - Unique numeric identifier pointing to an image in the database.
x - The coordinates of the center of the image. Returned to caller. Passed by reference always.
y -
z -
format - A description of how data in the data array is packed. See Insert_Image. Returned to caller. Passed by reference always.
width - The number of columns in data
height - The number of rows in data
data - The pixel values currently stored in the image referenced by key, encoded according to format. Returned to caller. Passed by reference always.

DETAILS

Show_Image() reads back the pixel values currently stored in an image. This is especially useful if the image was edited several times using Edit_Image() and you need to determine the final result. The key for the image might come from Show_Selection_Element() or Find_Contents(), or it might have been saved by your program when the image was created. Use Show_Image_Size() to determine how large the data array must be, before you actually call Show_Image.

Use Show_Partial_Image() to return the values of the pixels in just a portion of the image at a time. This is helpful if the image is very large and your program cannot (or need not) store the entire array at once. The rectangular region defined by the parameters to this function must be within the bounds of the image.

NOTES

RESTRICTIONS

See also:
Insert_Image, Edit_Image, Move_Image, Get_Selection, Begin_Contents_Search, Compute_Coordinates.

void Show_Image_Size ( HC_KEY  key,
float *  x,
float *  y,
float *  z,
char *  format,
int *  width,
int *  height 
)

Finds the size of a particular image, This is useful in determining the size of the data structure that must hold data.

Parameters:
key - Unique numeric identifier pointing to an image in the database.
x - The coordinates of the center of the image (Returned to caller).
y -
z -
format - A description of how data in the data array is packed (Returned to caller). See Insert_Image() for details.
width - The number of columns (Returned to caller).
height - The number of rows (Returned to caller).

DETAILS

No additional details. See Show_Image()

void Show_Image_Name ( HC_KEY  key,
char *  name 
)

Returns the name associated with an image key.

Parameters:
key - Unique numeric identifier pointing to an image in the database.
name - The name associated with the supplied image. This name is a valid texture name. Passed by reference. Returned to user.

DETAILS

No additional details. See Show_Image()

void Show_Partial_Image ( HC_KEY  key,
int  xpos,
int  ypos,
int  xlen,
int  ylen,
const HC_PIXEL *  data 
)

Returns a user-specified rectangular array of pixel data, as referenced by a key.

Parameters:
key - Unique numeric identifier pointing to an image in the database.
xpos - Offset, in pixels, from the upper-left corner of the original image, at which to return data. The upper-left- most original pixel is numbered (0, 0); values increase going right and going down.
ypos -
xlen - The count of columns and rows of pixels to be returned, going to the right and up. The counts, together with the offsets, represent a rectangular region within the original image.
ylen -
data - The pixel values currently stored in the image referenced by key, encoded according to format. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Show_Image()

void DShow_Image ( HC_KEY  key,
float *  x,
float *  y,
float *  z,
char *  format,
int *  width,
int *  height,
const HC_PIXEL *  data 
)

Similar to Show_Image(), but accepts and/or returns double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.

Parameters:
key - Unique numeric identifier pointing to an image in the database.
x - The coordinates of the center of the image. Returned to caller. Passed by reference always.
y -
z -
format - A description of how data in the data array is packed. See Insert_Image. Returned to caller. Passed by reference always.
width - The number of columns in data
height - The number of rows in data
data - The pixel values currently stored in the image referenced by key, encoded according to format. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Show_Image();

Main Index
Brief Index      Full Index      I.M. Functions