Show_Image

Functions

void DShow_Image (HC_KEY key, double *x, double *y, double *z, char *format, int *width, int *height, void *data)
 Similar to Show_Image(), but returns double-precision values. More...
 
void DShow_Image_Size (HC_KEY key, double *x, double *y, double *z, char *format, int *width, int *height)
 Similar to Show_Image_Size(), but operates on double-precision data. More...
 
void Show_Image (HC_KEY key, float *x, float *y, float *z, char *format, int *width, int *height, void *data)
 Returns the rectangular array of pixel data, as referenced by a key. More...
 
void Show_Image_Format (HC_KEY key, char *format)
 Returns the underlying format of the raster data in the provided image. More...
 
void Show_Image_Name (HC_KEY key, char *name)
 Returns the name associated with an image key. More...
 
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 More...
 
void Show_Partial_Image (HC_KEY key, int xpos, int ypos, int xlen, int ylen, void *data)
 Returns a user-specified rectangular array of pixel data, as referenced by a key. More...
 

Detailed Description

Function Documentation

◆ DShow_Image()

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

Similar to Show_Image(), but returns double-precision values.

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();

◆ DShow_Image_Size()

void DShow_Image_Size ( HC_KEY  key,
double *  x,
double *  y,
double *  z,
char *  format,
int *  width,
int *  height 
)

Similar to Show_Image_Size(), but operates on double-precision 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()

◆ Show_Image()

void Show_Image ( HC_KEY  key,
float *  x,
float *  y,
float *  z,
char *  format,
int *  width,
int *  height,
void *  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.

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

◆ Show_Image_Format()

void Show_Image_Format ( HC_KEY  key,
char *  format 
)

Returns the underlying format of the raster data in the provided image.

Parameters
key- Unique numeric identifier pointing to an image in the database.
format- A description of how data in the data array is packed (Returned to caller). See Insert_Image() for details.

DETAILS

No additional details. See Show_Image().

◆ Show_Image_Name()

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()

◆ Show_Image_Size()

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()

◆ Show_Partial_Image()

void Show_Partial_Image ( HC_KEY  key,
int  xpos,
int  ypos,
int  xlen,
int  ylen,
void *  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()