MakeBitmap
| Description: | Loads an image file of types BMP, EMF, WMF, APM, CUT, PCX, JPG, PNG, or TIF into memory and returns a handle to the result. Returns Invalid upon failure. |
| Returns: | Image handle |
Usage: ![]() |
Script or steady state. |
| Function Groups: | Graphics |
| Related to: | BitmapInfo | Crop | GUIBitmap | GUIButton | ImageArray | ImageSweep | ModifyBitmap |
Format: ![]() |
MakeBitmap(FileName [, Transparent1, Transparent2]) |
| Parameters: |
| FileName |
| Required. Any text expression giving the name of the file containing the image. A known path Known Path Aliases for File-Related Functions may be provided in the form, :{KnownPathAlias}. |
| Transparent1 |
|
An optional parameter giving the first color value to make transparent. Any of the following may be used:
If this value is negative 1 (-1), this parameter is ignored and no first color is made transparent. |
| Transparent2 |
An optional parameter giving the second color value to make transparent. Any of the following may be used:
If this value is negative 1 (-1), this parameter is ignored and no second color is made transparent. |
| Comments: | This function creates and returns an image value by loading an image from a file. All images are rendered in 32-bit color. An indexed color must translate into an exact 32-bit match to cause transparency. Colors may have their own transparency data via alpha values. Using an image value can improve speed and reduce memory requirements over using a file name directly in a function or statement. |
Example:
Image = MakeBitmap("C:\Bitmaps\dial.bmp");
This will create an image value storing the image from the file "C:\Bitmaps\dial.bmp".
