HC_Edit_Image

void HC_Edit_Image(Key key, int xoffset, int yoffset, int xcount, int ycount, void const *data)
void HC_Edit_Image(Key key, int xoffset, int yoffset, int xcount, int ycount, void const data)

Modifies one, some, or all the pixel values in a previously-inserted image.

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.

HC_Insert_Image, HC_Move_Image, HC_Show_Image, HC_Set_Color_Map, HC_Modify_Color_Map, HC_Delete_By_Key.

Parameters

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.