JPEG Bitmap Converter
Feature Description
The Traveo 2 JPEG Bitmap Converter allows the user to import compressed JPEG images directly into the solution using the JPEG bitmap profile. These JPEG images are then decoded by the onboard JPEG decoder at runtime. This means that the decompressed bitmaps need not be included in the assets, reducing the overall asset size.
Supported Platforms
At present, the JPEG Bitmap Converter is exclusively supported on the Infineon Traveo 2 platform.
Limitations
The JPEG Bitmap Converter currently has the following limitations.
- Preloaded Images in the asset only: The image must be part of the asset and cannot be dynamically supplied at runtime.
- Supported pixel formats: The following table shows the supported pixel formats for JPEG images.
Pixel Format Sampling Configuration Description YUV444 Y (Luma) Subsampling: H/V = 1/1
Cb (Chroma) Subsampling: H/V = 1/1
Cr (Chroma) Subsampling: H/V = 1/1
No chroma subsampling. Each Y, Cb, and Cr component has the same resolution. YUV420 Y (Luma) Subsampling: H/V = 2/2
Cb (Chroma) Subsampling: H/V = 1/1
Cr (Chroma) Subsampling: H/V = 1/1
Cb and Cr components are subsampled by 2 horizontally and vertically. Commonly used in video compression. RGB N/A Standard RGB format without chroma subsampling. - JPEG images with YUV420 pixel format must have an even width.
- JPEG images with YUV pixel formats (YUV420/YUV444) do not support changing of color using the color property of the BitmapBrushColorBlend (or any similar effects which allow changing of color using this property) on target.

- Surfaces with compressed formats such as YUV422 and YUV420 only support simple rotation (ie. multiples of 90)
Enabling the JPEG Decoder feature
If the JPEG Bitmap Converter feature is being used, ensure that the JPEG Decoder feature has been enabled in the CMAKE options. While generating the project for target, turn on the CMAKE flag CGIDEVICE_TRAVEO2_JPEG_DECODER_ENABLED or add this flag to the toolchain file.

How to use the JPEG Bitmap Converter
- Import the JPEG image: Using the import menu, select "Import Resources"

- Choose a JPEG image and click "Open".

- In the import dialog box, create a new JPEG bitmap profile by checking the “Set bitmap profile” checkbox and then click the “Browse” button as shown in the image below. This only needs to be done once for a new solution, if a JPEG bitmap profile already exists, skip to Step 7.

- In the Bitmap Profile Palette window that opens, click on the add button as shown in the image below. If the Default Bitmap Profile is not populated on the right-hand side, populate it as shown below.

- In the Add new Bitmap Profile dialog that opens, populate the fields as shown in the image below. Click “Ok” once done.

- On the Bitmap Profile Palette, confirm that the JPEG Bitmap Converter has been added as shown in the image below and press Ok.

- Select the JPEG Bitmap Profile from the dropdown menu if it is not already selected as shown in the image below. Click Ok.

- Add the image to the scene by dragging and dropping it into the scene editor.
- Select “Generate Asset Library” option in File menu to generate the asset and check if the compressed JPEG images have been put into the asset.
- The asset generation export report should show the image of the encoded JPEG image. In the image below it is visible that the image is only 33kb which is much lesser than the decompressed bitmap size for the same image.
