| Reply | « Previous Thread | Next Thread » |
|
I am developing a MIDP 2.0 game with high image compression demands.
Although PNG seems to be more widely supported, modern Nokia phones seem to have support for JPEG in MIDP 2.0 implementations which seems to be a better choice. My question is do this JPEG support also support any level of JPEG (de)compression? If not, are there any open source tools for loading highly compressed JPEGs or other formats with nice compression? We really need to reduce the file sizes as much as possible. Thankful for any helpful information on this subject. |
|
Maybe I was a bit unclear. What I would like to know is if I can, in Nokia phones use
Code:
Image.createImage(byte[] imgdata, int offset, int len) |
|
jpeg is never a better choice than png (would it be only because it is much less supported)
|
|
I think it is when there are high demands on compression and low demands on compatability. But the question was can I use Image.createImage with JPEG bitarrays? And is every grade of compression supported? The phone we are aiming for initially is 6600.
|
|
Yes, you can use JPEG byte arrays, because JPEG is a self-identifying format, just as PNG.
Also, JPEG is a very good choice if you work with photos and other content that compresses well using cosing transforms or similar lossy techniques. Moritz Voss MEF Mobile Entertainment Factory [url]http://www.m-e-f.net[/url] |
|
Join Date: Aug 2005
Posts: 67
Location: Venice, California
davidmanpearl
Offline
Regular Contributor
|
|
Has anyone determined a way to do this (decompress a jpg stream... or png, for that matter)?
This would make it possible to open portions of an image from a file or http stream - or to decimate into a thumbnail - directly from the stream without ever having to load the entire buffer into RAM at one time. In order to do this with Image.createImage, the phone must have enough available heap to hold both the entire byte array of the jpg, png, or other format file plus the full-resolution Image object. This is unreasonable. The various native image viewer apps in all cameras must use a method as described above when displaying large images, especially when they support zoom! Please describe to me how to do the same. - Regards, David Manpearl <dmanpearl_at_imatte_dot_com> |
|
I have the same problem, yet am struggling to find an answer.
=> How can I read/display a large JPEG image without loading the entire data into memory? Does some sort of on-the-fly JPEG converter exist? |
| sheepattack |
| View Public Profile |
| Find all posts by sheepattack |
|
Join Date: Aug 2005
Posts: 67
Location: Venice, California
davidmanpearl
Offline
Regular Contributor
|
|
Only option I have found is to manually read thumbnail image from .jpg EXIF data. Thumbnail is optionally stored in EXIF data of some .jpg images as an actual complete .jpg image. Therefore, only initial portion of large .jpg file has to be read. Requires custom byte reading and parsing capability and intimate knowledge of EXIF specification. Not easy, and still requires .jpg images with embedded thumbnails. Furthermore, there is no guarantee that the embedded thumbnail will even match the main .jpg file in the first place. Not at all an optimal solution. I wish I had a better answer.
- David Manpearl |
|
Sample code for thumbnail extraction is here
http://linuxmonkey.blogspot.com/2006...-for-j2me.html |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Series 60 MIDP SDK 2.0 Beta Emulator | cactus_zyx | Mobile Java Tools & SDKs | 2 | 2004-04-13 10:18 |
| Will Nokia support 100% MIDP 2.0??? | gicio | Mobile Java Networking & Messaging & Security | 5 | 2003-08-18 12:23 |
| Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working | mattbee | Mobile Java Tools & SDKs | 1 | 2003-06-10 12:43 |
| Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug? | kauppi | Mobile Java Tools & SDKs | 3 | 2003-04-07 10:05 |
| Http connection problem in 6310i | teahola | Mobile Java General | 1 | 2002-10-03 19:46 |