Work With Images - BEA WebLogic User Manual

Mobility server
Hide thumbs Also See for WebLogic:
Table of Contents

Advertisement

Work with Images

This section describes the techniques for delivering images to different devices. It explains how
to provide alternative objects so they match the display capabilities of the target device.
The section introduces the following tags:
<mm-img>
<mm-media-group>
<mm-logo>
About Images
Devices differ in how they handle and present graphical elements. PC browsers can display image
formats such as GIF and JPEG, whereas some WML devices are restricted to the WBMP format.
WebLogic Mobility Server provides a set of tags that manage graphic delivery to a variety of
client devices. These tags allow you to specify the correct image format for the requesting device
type.
For example, you could specify a 200 x 100 pixel GIF for a PC-browser, a 50 X 25 pixel GIF for
a PDA and a WBMP image for a mobile phone that can only support the WBMP format. When
WebLogic Mobility Server is transforming the content, it will select the image that best suits the
requesting browser.
Use <mm-img>
Send the Correct Image Type
The
tag can be used to place images in content that is intended for a variety of different
<mm-img>
client devices. This tag supports all the attributes of the XHTML
functionality of the where attribute which allows you to target the device for which the image is
intended.
Note: This is an empty tag, so remember to place a slash (/) before the final angle bracket (>) to
keep your content "well-formed".
To handle a GIF image, you could use the following syntax to ensure that the image would not be
sent to a WML browser that could not handle this particular image format.
<mm-img src="dog.gif" alt="Dog" height="54" width=80" where="ImgGIFSupported"
/>
Resize the Image to Fit the Device Screen
Because handheld devices have widely varying screen sizes, you sometimes need to be able to
dynamically manipulate the size of the image depending on the requesting device type. The
tag uses the
img>
fittoscreen
small screen.
If set to true, the image width is resized to the
in the Device Repository. The image height is resized by the same factor so that the image will
maintain the same aspect ratio.
Note: This attribute only has an effect if the original image is wider than the targeted screen
width.
attribute to give more control over how an image displays on a
UsableWidthPixels
BEA WebLogic Mobility Server User Guide - 105
Part IV Presentation of Mobile Content
tag with the additional
<img>
value of the device as defined
<mm-

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WebLogic and is the answer not in the manual?

This manual is also suitable for:

Weblogic mobility server

Table of Contents