Small WBMP Images

I spent a bunch of time slamming my head against a problem with small wbmp (wireless bitmap) images, and I’ve run into some interesting stuff. I had what I thought were small 2×2 wbmp images that I was trying to use in a wml page. However I was getting errors when I brought them up in the Services browser on my E61. Odd. At first I thought maybe I was returning bad MIME types or something, but I grabbed some sample wbmp images and put them on my server to test with, no problems.

Then I figured there must have been a problem with the image conversion, so I install a few additional packages to that wbmp images and convert using them. All give the same results, none of them show up properly on my E61. Hmm. Well maybe there’s some funkyness that I don’t understand about wbmp conversion and source images. wbmp is supposed to be a dirt simple format, so I set off in search of the spec. I was almost thwarted there, all the spec versions that showed up seemed to require authentication in some form. Luckily I found a version of the WAP 1.1 spec including wireless bitmap that had what was looking for.

The converted images looked good as far as I could tell. I hex dumped the sample images I found online and they looked like the same format. I hex edited a new image into the sample I got and even that came up alright. So the only thing that realy seemed to be different was the size, and sure enough when I created an image the same size as the wbmp sample I had and converted it that one worked fine!

After a bunch of fooling around I eventually ended up with bunch of wbmp images in different sizes, which when I bring it up using my E61 results in broken image indicators for all the images below 8×8 in resolution and proper display for anything 8×8 and above. I’m pretty sure I understand the file format now and it all looks fine:


mike@www:/var/www/www.madgat.com$ xxd 2x2.wbmp
0000000: 0000 0202 c0c0 ......
mike@www:/var/www/www.madgat.com$ xxd 4x4.wbmp
0000000: 0000 0404 f0f0 f0f0 ........
mike@www:/var/www/www.madgat.com$ xxd 8x8.wbmp
0000000: 0000 0808 ffff ffff ffff ffff ............

Is there a restriction somewhere in the spec that I’m missing that doesn’t allow for images with height or width below 8 pixels? Or is this some funkiness that I’m hitting into that affects just my handset? Or a subset of handsets of which mine is one? The info out on the interweb is pretty spotty. Wikipedia, normally the source of all that is good and right with the world, wasn’t even able to help on this one. Hasn’t this stuff been around for years? 1999, that’s like the dark ages. I would expect there would be tons of info floating around.

This entry was posted in ThisIsMobility. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">