|void||Edit_Image (HC_KEY key, int xoffset, int yoffset, int xcount, int ycount, const void *data)|
|Modifies one, some, or all the pixel values in a previously-inserted image. More...|
|void||Edit_Image_Options (HC_KEY image_key, char const *options)|
|Modifies the the options associated with a specific image. More...|
|const void *||data|
Modifies one, some, or all the pixel values in a previously-inserted image.
key - The numeric identifier returned by a previous call to Insert_Image() or Insert_Image_By_Ref() . xoffset - X offset, in pixels, from the upper-left corner of the original image at which to begin editing. The upper-left-most original pixel is numbered (0, 0). Values increase going right and going down. yoffset - Y offset, in pixels, from the upper-left corner of the original image at which to begin editing. The upper-left-most original pixel is numbered (0, 0). Values increase going right and going down. xcount - The number of columns of pixels to be changed, going down. The count, together with the offset, represents a rectangular change region within the original image. ycount - The number of number of rows of pixels to be changed, going to the right. The count, together with the offset, represent a rectangular change region within the original image. data - The new pixel values to be used, encoded in the same format as when the image was created. The first group of values in data is the upper-left-most of the change region; the next group is just to its right, etc. Passed by reference always.
Edit_Image() lets the user modify a large image as it sits in the database. It is not necessary to delete or flush the segment and reinsert the image from scratch.
Edit_Image() operates on a rectangular sub-region of the original image, and replaces all the pixel values in that region with new ones. If the original image was specified "by reference", and the system did not copy it, Edit_Image() modifies the actual original user memory locations.
If you have a key to an image, but do not know the format in which it was inserted (as when the user selects one of many images with the mouse), you can use Show_Image_Size() for the required information. It is not possible to change the size of an image except by starting over.
|char const *||options|
Modifies the the options associated with a specific image.
image_key - The numeric identifier of an image, returned by a previous call to Insert_Image() or Insert_Image_By_Ref(). options - Comma separated list of new options.
The following choices are recognized for options. These are a subset of the options available when the image is initially inserted via a call to Insert_Image():
name = <string>
This name will be used to create a texture with the options specified in 'texture options'. Providing no texture option string will mean that a texture is then created with default texture options.
[no] down-sample [= on | off]
If this is set, images will have a bilinear filter applied to them. This typically makes images look smoother, especially if zoomed upon. However, if there are hard edges (e.g. a checker board) it can make the image look unnecessarily blurry. Default = "down-sample"
size = ((float) width units, (float) height units) size = <float> units
Scale for an image where units is either "oru", "sru" or "pixels". "size = <float> units" will preserve aspect ratio.
[no] local [= on | off]
If set, the implicit texture created will be local to the currently open segment. Default = "no local".
texture options = (...)
Options for the implicit texture created for the image. See Define_Texture() for the list of recognized options. The texture options will merge with any existing texture options.