Member attributes: Format
This attribute controls the color conversion of a bitmap resource member.
Syntax
Native
Alpha8
Index8
RGB565
Discussion
The attribute Format determines the expected pixel format of the bitmap resource. This affects the capabilities and the memory footprint of the bitmap. The following table provides an overview of the supported formats:
Format |
Description |
---|---|
Native |
Represents the pixel format, the particular target system is working with internally. Bitmap resources configured with this format will always contain color and opacity information. Please note, the memory footprint of a Native bitmap depends on how the bitmap is stored internally in the target system. For example, in case of the target system working natively with RGBA8888 pixel format, the bitmap will occupy 32-bit per pixel. The format Native is the default setting. |
Alpha8 |
Represents a pixel format containing the opacity information only without any color information. During conversion of the original image file, Embedded Wizard evaluates the brightness of each pixel and converts it in the corresponding opacity value. 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. In the target system the bitmap occupies 8-bit per pixel. Please note, when using an Alpha8 bitmap, you will need to specify an arbitrary color or color gradient to colorize this bitmap at the runtime (see e.g. using image views). |
Index8 |
Represents a universal 8-bit per pixel palette format. This format expects an additional color palette for translation between an 8-bit index and the color value used natively in the target system. Bitmap resources configured with this format can contain color and opacity information. The advantage of this format is the very low memory footprint. On the other hand, every Index8 bitmap is limited to use max. 256 different colors. This format is ideal to save memory. |
RGB565 |
Represents a 16-bit per pixel RGB color only format without any opacity information. Using this format instead of Native can help you to save memory by still covering a large color space. |
Please note the additional attribute Dithering permitting you to configure whether and how Embedded Wizard should optimize the bitmap. In particular the appearance of an RGB565 or Index8 bitmap can be improved significantly if dithering is activated. Also see the attribute Mode, which allows you to control the compression of a bitmap resource.
Modify the attribute
To inspect or modify the value of a Format attribute, select first the affected bitmap resource member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the available assistant you can activate by clicking on the button right to the attribute:
Localization
The attribute Format can be localized allowing the creation of bitmap resource members with language dependent pixel formats. 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 format for a particular language specific value, the format 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.