ComponentRef

Bitmap From File

BitmapFromFile

Import an external bitmap to your application.

This component can only be used in the Bitmap.Producers property.

See also: Bitmap

Properties

BitmapFile

The content of the imported bitmap. Click the "..." button that is located beside the property in the editor to browse for a bitmap file. When a bitmap is selected it is imported to your application and is no longer referenced on disk.

Currently the are the following limitations:

  • The dimensions (width and height) of the bitmap must be the same as the Bitmap-component that the BitmapFromFile-component produces. For example to import a file that is 128x64, you must first set the Height and Width properties on your Bitmap component to match this.
  • Alpha channel information is not imported

Note: Importing bitmaps will increase your exe-file size very quickly, so be careful if you want to keep your program small. Upx-compression works similar to what is used in the GIF-file format, so if your image is small when saved as a GIF-file then it will also have good compression ratio in ZGE as well. Bitmaps from JPG-files have very poor compression in Upx so try first to preprocess the image in an art-package like Photoshop for reducing the number of colors used.

Transparency

Controls bitmap is transparency.

  • None - Bitmap do not have any transparent areas.
  • BlackColor - All black (RGB 0) areas of the bitmap will be transparent.
  • AlphaLayer - Use the bitmaps alpha layer for transparency. Alpha is imported from BMP-files if present.

Green Marinee theme adapted by David Gilbert, powered by PmWiki