XML/Minibrowser/SnomIPPhoneImage

From Snom User Wiki

Jump to: navigation, search
  • Description: The <SnomIPPhoneImage> tag includes a 64base encoded bmp file. Use the <LocationX> and <LocationY> tags to position the bitmap on the display.
  • Sub Tags:
    • <Data> = base64-encoded image
      • snom360 format: 128x64 Pixel, 1-bit (monochrome) color, Windows bitmap (.bmp)
      • snom370 format: 240x128 Pixel, 5-bit (grayscale) color, Windows bitmap (.bmp)
    • <LocationX>
      • snom360: 0..128
      • snom370: 0..240
    • <LocationY>
      • snom360: 0..64
      • snom370: 0..128
  • Example: http://www.snom.com/minibrowser/lejla_image.xml
<?xml version="1.0" encoding="UTF-8"?>

<SnomIPPhoneImage>
 
<LocationX>0</LocationX>
<LocationY>0</LocationY>

<Data encoding="base64">
 Qk2eBQAAAAAAAD4AAAAoAAAAgAAAAFYAAA
ABAAEAAAAAAGAFAAARCwAAEQsAAAIAAAACAAAAAAAAAP///wD//
////////////////////////////////////////////////
///////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAADDgAAAAAAAAAAAAAAAAAAA/8AAAAAAA
AAAAAAAAAAAAAfuAAAAAAAAAAAAAAAAAEAH/wAAAAAAAAAAAAAAAAcAH/+AAAAAA
 AAAAAAAAAAGAH/3gAEAAAAAAAAAAAAABAB/+gADAAAAAAAAAAAAAAgAf/4AAgAAAAAAAAAAAA
AAAf/+AAYAAEw4AAAAAAAAEAP//4AHAACYPwAAAAAAABAH///gDwAAgP0AAAAAAAAQD////A+AAM/
8AAAAAAAAEA////4PwACP/gAAAAAAABAPwD//B+AAJ/2AAAAAAAAIHAAP/wfwAAMwQAAAAAAAADgAf/8
P8ACDGAAAAAAAAAA4P///D/gAABwAAAAAAAAAf/9//wf8AAAA8AAAAAAAAH/+//8D/gAAAAAAAAAAAAB//D//A
f8AAMAAAAAAAAAAf/4//wH/wAGAAAAAAAAAAH/8P/8A58AAAAAAAAAAAAB/+B//AMPgAAAAAAAAAAAAf+AP/wDh8AAAAA
AAAAAAAH+wB/0AYPAAAAAAAAAAAAB/uAPwAHDwAAAAAAAAAAAAf5gBgADwcAAAAAAAAAAAAHCAAAAB8HAAAAAAAAAAAABgA
ADgU/BwAAAAAAAAAAAAAAIAB7eAMAAAAAAAAAAAAAAPAD8/gCAAAAAAAAAAAAAAD//wP4AAAAAAAAAAAAAAAB/4AD+AAAAA
AAAAAAAAAAAf8AA/gAAAAAAAAAAAAAAAD/4APwAAAAAAAAAAAAAAAB//gD4AAAAAAAAAAAAAAAAf//g9AAAAAAAAAAAAAAg
 AD/j8OAAAAAAAAAAAAAAIAAD/wDAAAAAAAAAAAAAACAB/88AwAAAAAAAAAAAAAA/+fxwgMAAAAAAAAAAAAAAP5+/HEBAAAA
AAAAAAAAAAD/nx4YAQAAAAAAAAAAAAAAf/Hj4AAAAAAAAAAAAAAAAH/46eAAAAAAAAAAAAAAAAA//HTgAAAAAAAAAAAAAAA
AH/+IAAAAAAAAAAACAAAAAB//IAAAAAAAAAAAAwAAAAAP/9AAAAAAAAAAAADAAAAAA//eAAAAAAAAAAAAAAAAAAH84YAAAA
AAAAAAAAAAAAAA/hgAAAAAAAAAAAAAAAAAAD7gAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAA+gAAAAAAAAAAAAAA
AAAAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</Data>
</SnomIPPhoneImage>
  • Result:
Image:lejla.gif

To convert a BMP image with the above properties to a base64 encoded form which can be used like in the above example script, you may use perl:

perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' < pic.bmp > pic64

And in order to convert the base64 encoded form back to a PC viewable BMP, may use:

perl -MMIME::Base64 -ne 'print decode_base64($_)' < pic64 > pic.bmp
Personal tools
Interoperability