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:
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<card id="card1" title="Image in WML">
<img src="smileBig.gif" alt="Smile" /><br/>
Welcome to our WML tutorial.
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:
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.
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.
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|
- 1. WML (Wireless Markup Language) Introduction
- 2. WML Deck and Card
- 3. WML Document Structure
- 4. WML Generic Metadata: <meta>
- 5. Comments in WML
- 6. Line Breaking in WML
- 7. Font Size and Style in WML
- 8. WML Preformatted Text: <pre>
- 9. WML Images
- 10. WML Tables
- 11. WML Anchor Links
- 12. Programming Softkeys of Mobile Phones and the <do> Element
- 13. WML Template and Menu
- 14. WML Events and the <onevent> Tag
- 15. Timer and the ontimer Event
- 16. WML Event: onenterbackward
- 17. WML Event: onenterforward
- 18. WML Selection Lists and the onpick Event
- 19. WML Input Fields
- 20. WML Variables
- 21. Submitting Form Data to the Server in WML
- 22. Clearing a Saved Form in WML