You Are Here:

Community: Developer Discussion Boards

#1 Old how to display image? - 2004-01-31, 15:40

Join Date: May 2003
Posts: 2
ganesh_babu
Offline
Registered User
hai, I need to show the image in the screen.The image is in the server and has to be downloaded, which I was able to figure out.

But the image in server is a bmp or jpeg format and midp accepts png only(I think so?) . Is there any way to directly display a bmp or jpeg? or how a bmp or jpeg image can be saved in png format in the server ie j2se envirorment.
Reply With Quote

#2 Old 2004-02-03, 11:44

Join Date: Mar 2003
Posts: 118
Location: Rotterdam, Holland
remonvv
Offline
Regular Contributor
No, unless you write your own image decompressor for JPG/GIF it's not possible, and from experience i know that neither is an easy thing to do (both use recursive/fractal based compression). Just make sure it is provided as a PNG byte stream and pass it to Image.createImage with such a bytestream as a parameter.
Reply With Quote

#3 Old another solution - 2004-02-03, 16:33

Join Date: May 2003
Posts: 2
ganesh_babu
Offline
Registered User
Thanks for your answer. I would like to share something interesting that I found regaurding the topic. SourceForge.net site has a lot of interesting projects. One among them is "gtgl". It's a graphics library. I ran the demo that came with the doc, It was great. It was able to load jpeg images. Ofcourse it does that by having its own jpeg and gif coder.
Reply With Quote

#4 Old 2004-02-04, 15:29

Join Date: Mar 2003
Posts: 118
Location: Rotterdam, Holland
remonvv
Offline
Regular Contributor
I'm guessing the footprint of that API is rather large though.
Reply With Quote

#5 Old 2004-02-05, 21:40

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Online
Forum Nokia Champion
It depends on what you're targeting.

The MIDP specification only requires implementations to support PNG... it doesn't prevent them from supporting anything else. Many Nokia phones will handle JPEG images, for example. You should be able to determine if a device will support an image type by trying to use one, and seeing if you get an exception thrown.

This is, of course, no use if you need generic MIDP support. You would need to know (or have some control over) the specific device for which you are developing.

Graham.
Reply With Quote

#6 Old Cannot find GTGL - 2004-03-05, 18:59

Join Date: Feb 2004
Posts: 1
Location: UK
ewong888
Offline
Registered User
Hi,
Can you help me with the following questions,
i) I cannot find gtgl in sourceforge.net. Do you know how I can find it?
ii) Can some Nokia phones such as 6600 and 7650 display JPEG images without any extra J2ME classes?
iii) I don't want to program my JPEG codec, is there any source code available that we can use?

Thanks for your help!
A very desparate man ...
Reply With Quote

#7 Old 2004-03-10, 17:07

Join Date: Mar 2003
Posts: 118
Location: Rotterdam, Holland
remonvv
Offline
Regular Contributor
i) I cannot find gtgl in sourceforge.net. Do you know how I can find it?
Nope

ii) Can some Nokia phones such as 6600 and 7650 display JPEG images without any extra J2ME classes?
Yes, as long as the format is both supported by the device and format information is present in the byte array (meaning, if it can figure out it's reading GIF, JPEG or PNG data from the stream instead of the extension for example, GIF, JPEG en PNG all qualify though).

iii) I don't want to program my JPEG codec, is there any source code available that we can use?
Try sourceforge, you really should try to work around writing or using a custom decoder though, it's a big bulk of code and potentially buggy, version dependant etc.
Reply With Quote

#8 Old 2004-06-09, 12:04

Join Date: Jun 2004
Posts: 1
Location: near Amsterdam
m_arsha_ll
Offline
Registered User
-----------------------------------------------------------------------------
ii) Can some Nokia phones such as 6600 and 7650 display JPEG images without any extra J2ME classes?
Yes, as long as the format is both supported by the device and format information is present in the byte array (meaning, if it can figure out it's reading GIF, JPEG or PNG data from the stream instead of the extension for example, GIF, JPEG en PNG all qualify though).
-----------------------------------------------------------------------------------

Does this automatically means that you can use the createImage method with a bytebuffer argument that is filled from a jpg?

or will this still return an illegalArgumentException

Another oftopic question: Where do you find phone specific emulators. Till now im still using serie 40 or serie 60 from nokia. But i do want to test on a 6600 emulator for instance.
Reply With Quote

#9 Old Webviewer - 2004-06-22, 09:02

Join Date: Apr 2004
Posts: 14
sharad_unn
Offline
Registered User
There are some applications like webviewer
which is present in http://www.midlet.org
this application is used to see a html content
in ur device its a HTML browser made in J2ME
for java enabled device and it also converts
images from jpeg or gif to pngs to display it
in the Canvas.
I am surprised to see that.
I don know how it works.
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

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