| C H A P T E R 3 |
|
Converting Images to Raw Format |
To make the Java AMS run as fast as possible, the Java Wireless Client software enables images to be loaded from raw data files instead of decoded from PNG files. This option is turned on at build time by specifying USE_RAW_AMS_IMAGES=true.
The ImageToRawTool converts PNG images to an appropriate raw format. The exact raw format depends on the target build platform.
The source code for ImageToRawTool is in:
InstallDir/midp/src/tool/imageutil/classes/com/sun/midp/imageutil.
A JAR file containing the tool is created and used at build time. It is located in the output binaries folder directory:
InstallDir/output/midp/bin/platform
output is the top-level directory designated as the location for your Java Wireless Client software build output and platform is the target platform. For example, the on Linux the target platform could be i386 or arm; on Win32, it is the JavaCall
API.
|
Note - The InstallDir/output directory is named by convention. You can name the output directory for your Java Wireless Client software build anything you choose. |
The ImageToRawTool options are as follows:
[-help]
[-debug]
-format formatXMLFile
-out outputImagesDirectory
imagesToConvert
The raw image format is described in formatXMLFile, according to configuration.dtd, which works in a similar way to skin.xml.
For example, the linux_fb platform uses the following raw image format:
<rawimage
Format="Putpixel"
Colors="565"
Endian="Little"
/>
The descriptions of raw image formats for each platform supported in the Java Wireless Client software are provided in the rawimage.xml files located in InstallDir/midp/src/configuration/configuration_xml/platform.
In the above path, platform could be win32, arm, the javacall porting layer, linux_fb, or linux_qte.
Copyright © 2007, Sun Microsystems, Inc. All rights reserved. SUN PROPRIETARY/CONFIDENTIAL.