| Reply | « Previous Thread | Next Thread » |
|
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. |
| ganesh_babu |
| View Public Profile |
| Find all posts by ganesh_babu |
|
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.
|
|
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.
|
| ganesh_babu |
| View Public Profile |
| Find all posts by ganesh_babu |
|
I'm guessing the footprint of that API is rather large though.
|
|
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. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
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 ... |
|
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. |
|
-----------------------------------------------------------------------------
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. |
| m_arsha_ll |
| View Public Profile |
| Find all posts by m_arsha_ll |
|
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. |
| sharad_unn |
| View Public Profile |
| Find all posts by sharad_unn |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|