I've been struggling with creating thumbnails in J2ME—not that it's hard to do—but given the limited heapsize and mobile handsets' processor capability, the traditional Java (J2SE) thumbnail-generation process fails when the picture whose thumbnail about to be generated is HUGE (eg. those created by >2 megapixel cameraphones).
In general, there are few approaches:
1. generate your own thumbnail (good for smaller JPEG pictures & PNG formats)
2. read (hidden?) thumbnail directories that some handsets create
3. try to extract thumbnail inside EXIF header of some JPEG pictures
The 2nd & 3rd options don't always work for all phones. Problem with #2 is that only on some handsets is the picture thumbnail generated into predetermined directories. For #3, some developers claim Nokia cameraphones do not generate JPEG formats with EXIF headers in it. Sony-Ericsson phones do, however!
So this is the original Java library that I used to extract the EXIF header and obtain the thumbnail offset, length and the thumbnail data itself. It needs porting, however, to be able to run on J2ME. I've ported it into J2ME and the (crude!) source for the test midlet is here. Some sample pictures can be found at the original site.
More information about EXIF tags can be found here, in case you'd like to tinker with more exciting information! If anyone comes to this blog by searching for this, please feel free to download it & use as you like. Original code is copyrighted and it belongs to Drew Noakes.
I hope this helps some people out there.
UPDATE! (Apr 1 '2009):
The domain where the source is hosted has expired ;) I have updated the link to point here: http://blvu.com/exif-j2me-src.zip