9.4. Issues Concerning Large Images in WML

Many WAP browsers do not have the horizontal scrolling functionality. So, they will crop off an image if its width is larger than that of the wireless device's screen, which means your mobile Internet site may not look nice and professional to your users. Besides, you have to remember wireless devices have limited memory. A WAP browser may not be able to display the image if its size is too large.

The following WML example shows how a large image will look on some mobile phone browsers:


(imageEg2.wml)

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">

<wml>
  <card id="card1" title="Image in WML">
    <p>
      <img src="smileBig.gif" alt="Smile" /><br/>
      Welcome to our WML tutorial.
    </p>
  </card>
</wml>






Sony Ericsson T610








Sony Ericsson T68i








Nokia Mobile Browser 4.0


As you can see in the above screenshots, the Sony Ericsson T610 and T68i mobile phone browsers crop off the sides of a large image while the Nokia mobile browser allows users to scroll to the right to see the section off the screen.

Another issue that you have to concern is that the image size will affect your mobile Internet site's performance. Also, a larger image will result in a higher WAP connection cost for those who visit your mobile Internet site. For example, cellular network operators charge their GPRS service subscribers by the amount of data transmitted through their cellular network. The larger the file size, the higher the service fee.

It is essential to optimize the images in your WML documents so as to keep the image size small. Using the <img> tag's height and width attributes to scale down an image does not help since the actual file size of the image is still the same. Here are some techniques and suggestions for optimizing images:

  1. Using an image manipulation program like GIMP and Photoshop to scale down the images, instead of using the height and width attributes of the <img> tag.

  2. If the images are GIF files, you should use a small palette. A smaller palette can mean lower image quality, so you have to take a balance between quality and file size.

  3. If the images are JPG files, you should save them in a suitable compression ratio. A higher compression ratio will result in a smaller file size but a lower quality. So, you have to take a balance between quality and file size.


Previous Page Page 14 of 50 Next Page


Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page