Member attributes: AlphaName

This attribute determines an image file to use by a bitmap resource member.

Syntax

BMP‑file‑nameorPNG‑file‑nameorJPG‑file‑nameorGIF‑file‑name

Discussion

The attribute AlphaName determines the path to an image file containing the pure opacity information for the bitmap represented by a bitmap resource member. During conversion, Embedded Wizard evaluates the brightness of each pixel in the image file and converts it in the corresponding opacity value for the resulting bitmap. Black pixel means full transparency. White pixel, in turn, are interpreted as pixel being fully opaque. Gray values lying in between result in a semi transparent pixel. Embedded Wizard can process files stored in the formats BMP, JPG, GIF and PNG. Please note, with PNG files, you can provide the opacity information stored as such natively within the image file.

If the affected bitmap resource specifies an additional image file in its FileName attribute, then both images are merged together resulting in a bitmap with color information provided in the file FileName and the opacity information from the file AlphaName. If no file is specified in the FileName attribute, the resulting bitmap resource is considered as alpha only bitmap, containing the pure opacity information from the file AlphaName. Please note, with alpha only bitmaps, you will need to specify an arbitrary color or color gradient to colorize the bitmap (see e.g. using image views).

If the attribute AlphaName doesn't specify an absolute file path, the path is considered as being relative to the directory of the unit, the affected bitmap resource is defined inside as its member.

Modify the attribute

To inspect or modify the value of an AlphaName attribute, select first the affected bitmap resource member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the available file selection assistant you can activate by clicking on the button right to the attribute:

Localization

The attribute AlphaName can be localized allowing the creation of bitmap resource members with language dependent images. For this purpose expand the attribute by clicking on the small triangle left to the attribute. All available language specific values are listed thereupon below the attribute and can be modified individually:

If you haven't specified any image file for a particular language specific value, the image from the fallback language Default is used automatically. Once localized values can be removed easily by pressing the keys CtrlR when the affected value is selected.