WML Images - WML

What are WML images?

The <img> element is used to define an image in a WAP card. WAP-enabled wireless devices only supported the Wireless Bitmap (WBMP) image format.
WBMP images consists of two colors: black and white. The file extension of WBMP is ".wbmp" and the MIME type of WBMP is "image/vnd.wap.wbmp".
The <img> element supports the following attributes:
Attribute Value Description
align
  • top
  • middle
  • bottom
Alignment of the image
alt alternative text Sets an alternate text to be displayed if the image is not displayed.
height
  • px
  • %
Height of the image in pixels or percentage. If you specify the value in pixels, the syntax is "140", instead of "140px".
hspace
  • px
  • %
Sets white space to the left and right of the image. If you specify the value in pixels, the syntax is "140", instead of "140px".
localsrc cdata Sets an alternate representation for the image. If this attribute is set, the browser will use it instead of the "src" attribute.
src image url A path to wbmp image.
vspace
  • px
  • %
Sets white space above and below the image. If you specify the value in pixels, the syntax is "140", instead of "140px".
width
  • px
  • %
Sets the width of the image.If you specify the value in pixels, the syntax is "140", instead of "140px".
xml:lang language_code Sets the language used in the element
class class data Sets a class name for the element.
id element ID A unique ID for the element.

How to Make ".wbmp" Images

You can use various free tools available on the Internet to make ".wbmp" images.
The Nokia Mobile Internet Toolkit (NMIT) includes a WBMP image editor to apply. You can convert existing GIF or JPG image files into WBMP file using NMIT.
You can use another free tool called ImageMagick to create WBMP images.
Following is the example showing usage of <img> element.
This will produce the following result:
wap-example8

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WML Topics