You Are Here:

Community: Developer Discussion Boards

#1 Old Question JPEG decompression in MIDP 2.0 - 2006-02-03, 14:40

Join Date: Jan 2006
Posts: 18
di01dkg
Offline
Registered User
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.
Reply With Quote

#2 Old Re: JPEG decompression in MIDP 2.0 - 2006-02-07, 14:04

Join Date: Jan 2006
Posts: 18
di01dkg
Offline
Registered User
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)
to load a byte-array containing a JPEG-file?
Reply With Quote

#3 Old Re: JPEG decompression in MIDP 2.0 - 2006-02-07, 18:14

Join Date: Mar 2005
Posts: 499
Location: Paris
njzk2
Offline
Regular Contributor
jpeg is never a better choice than png (would it be only because it is much less supported)
Reply With Quote

#4 Old Re: JPEG decompression in MIDP 2.0 - 2006-02-07, 21:59

Join Date: Jan 2006
Posts: 18
di01dkg
Offline
Registered User
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.
Reply With Quote

#5 Old Re: JPEG decompression in MIDP 2.0 - 2006-03-06, 13:23

Join Date: Feb 2006
Posts: 16
Location: Bonn, Germany
Send a message via ICQ to Thygrrr Send a message via Yahoo to Thygrrr
Thygrrr
Offline
Registered User
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]
Reply With Quote

#6 Old Re: JPEG decompression in MIDP 2.0 - 2006-03-14, 19:04

Join Date: Aug 2005
Posts: 67
Location: Venice, California
Send a message via Yahoo to davidmanpearl
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>
Reply With Quote

#7 Old Re: JPEG decompression in MIDP 2.0 - 2007-06-29, 19:35

Join Date: Dec 2005
Posts: 30
sheepattack
Offline
Registered User
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?
Reply With Quote

#8 Old Re: JPEG decompression in MIDP 2.0 - 2007-06-29, 20:33

Join Date: Aug 2005
Posts: 67
Location: Venice, California
Send a message via Yahoo to davidmanpearl
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
Reply With Quote

#9 Old Re: JPEG decompression in MIDP 2.0 - 2008-08-20, 06:42

Join Date: Mar 2003
Posts: 45
nicholso
Offline
Registered User
Sample code for thumbnail extraction is here
http://linuxmonkey.blogspot.com/2006...-for-j2me.html
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ