ModifyBitmap
(Engine-Level Function)
Description: | Reads an existing image handle and produces a new one with modifications. The original image is not altered. Returns invalid upon failure. |
Returns: | Image |
Function Groups: | Graphics |
Usage: | Script or steady state. |
Related to: | Crop | GUIBitmap | GUIButton | ImageArray | ImageSweep | MakeBitmap |
Format: | ModifyBitmap(Handle[, Reflect, Hue, Saturation, Lightness, Transparency, Contrast, ColorizeHue, ColorizeSaturation, AntiAlias, ScalarColor, Rotation] ) |
Parameters: |
Handle |
Required. The image handle to copy and modify. |
Reflect |
An optional logical value that can be set to 1 to reflect the image about the vertical axis. The default is no reflection (0). |
Hue |
An optional numeric expression for the hue rotation to apply to all of the colors in the image. Range -180 to 180. The default is no hue rotation, (0). |
Saturation |
An optional numeric expression that is a multiplier to the intensity of each primary color component of every color in the image. Range: 0 to 255. Defaults to 1 if missing or invalid. |
Lightness |
An optional numeric expression that is a multiplier to the brightness of the image. Range 0+. Defaults to 1 if missing or invalid. |
Transparency |
An optional numeric expression for a multiplier to the transparency (alpha value) of every color in the image. Range 0 (transparent) to 1 (opaque). Defaults to 1 if missing or invalid. |
Contrast |
Optional numeric expression to enhance the differences between the colors in the image. Range 0+. Defaults to 1 if missing or invalid. |
ColorizeHue |
Optional numeric expression for the hue value of a color to be mixed with every color in the image. Range -180 to 180. Defaults to 0 if missing or invalid. |
ColorizeSaturation |
Optional numeric expression for the intensity of the added color. Zero means that no color is added. Range 0-1. Defaults to 0 if missing or invalid. |
AntiAlias |
Bit 0 controls whether anti-aliasing will be done when the image is stretched. Defaults to 1 (TRUE) if missing or invalid. By default, feathering will be applied to an anti-aliased image when it is stretched. Set bit 1 to 1 (TRUE) to suppress feathering. |
ScalarColor |
Optional color value in the form aRGB A colour value, defined as four, two-digit hexadecimal values. Alpha - Red - Green - Blue. An Alpha value of FF is assumed if only the RGB values are provided., used to apply a specific color to a gray-scale image. |
Rotation |
Optional floating point value, specifying the clockwise rotation in degrees to be applied when the image is drawn. |
Comments | Some image modifications have a greater performance impact than would typically be assumed, due to the way image rendering is optimized. Scaling and cropping changes are slow, for example |