For those mobile phones that don't support displaying JPEG in midlets....
By wapcamer on Tuesday 20 March 2007, 15:49 - Wapcam Project - Permalink
The problem is that WapcamLet midlet is not able to display
JPEG snapshots delivered by WapcamServer or any other IP cam.
This is annoying as JPEG is the most widespread format and offers the best
compression/quality rate.
I have been pretty happy of my Samsung i320, but I must say that as usual
with the korean manufacturer, the implementation of the Java virtual machine
doesn't seem to meet all the requirements specified in MIDP2 (let(s not speak
about JTWI).
The problem is that WapcamLet midlet is not able to display
JPEG snapshots delivered by WapcamServer or any other IP cam.
This is annoying as JPEG is the most widespread format and offers the best
compression/quality rate.
Anyway, I managed to bypass this limitation by adding an option, both in
WapcamServer and in WapcamLet. This option lets the user choose between the
requested format: for now, we only support PNG. PNG is the
preferred format for midlets so I garantee it will work on MIDP 1 as well as
MIDP 2. The drawback is that such images are 10x-20x bigger than JPEGs. You
might be carefull to your network consumption, but if, like for me, it is not
an issue, then you will find your happiness with it ( I sure did !).
On my way to develop this change, I decided also to add an option to resiz
images on the fly. For example, if you webcam's capture format is 640x480 but
you cell phone only has a 96x65 px screen, it is a huge waste of bandwith. Now,
you can precise what format you are expecting and the snapshot will fit your
screen. However it will keep its initial ratio aspect. Note that you can
equally ask for a bigger image if you wish so.
These modifications will take place in WapcamServer1.4 beta for the server
side, and in a WapcamLet1.1 release to come out soon.
You can also simply specify it as parameters in the URL following that scheme: http://myserverIP:myserverPort/snapshot/?fmt=png&height=240&width=320

