Sun Java System Portal Server Mobile Access 7.1 Developer's Guide

Image Transcoding

Mobile Access includes functionality to convert images into forms that can be displayed on mobile devices. However, large images are not displayed.

For example, images can be converted from .png format to .wbmp format if the target device supports only .wbmp. The image transcoding component can read .gif, .jpeg, .bmp, .wbmp, and .png image types and convert them into .jpeg, .bmp, .wbmp, and .png target types.

The image transcoding component can also scale images to fit the mobile device screen. Content developers can pass their images through the image transcoding servlet which is deployed along with the portal application. It takes the following parameters:

1. Image source - This could be an URL to an image within the portal application, or a complete URL to an image in some other location.

2. ScaleX - The horizontal width to which the image must be scaled.

3. ScaleY - The vertical width to which the image must be scaled.

Examples:

In XHTML files:

<img src="transcode?src=/images/logo.gif&amp;scalex=100&amp;scaley=150">

In AML files:

<AmlImage src="transcode?src=/images/logo.gif&amp;scalex=100&amp;scaley=150">