| Reply | « Previous Thread | Next Thread » |
|
Hello everybody,
I have written an applet that allows drawing images (with the help of the Graphics class). My data is stored in a byte array. How can I save these images on the phone? Any idea? package?... Thanks a lot for your help, Rikow |
|
I have already posted a reply here in this link
http://discussion.forum.nokia.com/fo...907#post224907 Please dont make multiple postings in same regard, that may confuse other users searching in future. Regards Gopal |
|
Hi rikow,
You can save the images to the filesystem on the phone if ur phone supports jsr75.Please read jsr75 guidelines. Thanks Soku |
|
Thanks a lot for your answers!
but.... Do I need a PNG encoder (for example) for midlet? I did not found any on the web... My phone is a Nokia 6680 and supports FileConnection... but I think the main problem is to encode my image (byteArray) in a picture format, as PNG. How can I do that? Any Idea? link? code? encoder? |
|
Hi,
U will surely require a png encoder. this is because u have to convert an image to bytearray inorder to save it in the filesystem. AFAIK there is no readily available png encoders for J2me. the only thing u can do is that there are png encoders available for j2se. u have to port it into j2me. For this u may use google Regards, Wang |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
hello Wang,
bear with me (still learning) but PNG encoding should be default encoding for captured image byte array (PNG is default encoding that should be implemented to byte array according to JSR docs), also we (I also have 6680) should be able to specify encoding in getSnapshot(..) method, according to Nokia docs that's default in fact: Code:
videoControl.getSnapshot(null); // default PNG, 160x120 so after taking byte array shouldn't we simply be able to write it to file with ".png" extension? regards, Peter |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
|
Quote:
Anyway, does anyone of you know of a j2me jpg encoder? thanks! |
| alliance205 |
| View Public Profile |
| Find all posts by alliance205 |
|
May be you should give a try with the encoding part of "JpegEncoder.java" in this link (Not tried it myself yet!)
http://koders.com/java/fidD639747F90...essdash.ui.lib Yep! This is a J2SE code, give a try adapting the encoding part to J2ME! Hope this helps! Regards Gopal __________________ MobiQuil.com An initiative by Developers for Developers. http://www.mobiquil.com - Alpha - Launched. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| png and jpg | simonesec | Mobile Java Media (Graphics & Sounds) | 3 | 2005-06-06 09:24 |
| using jpg instead of png??? | farhanx | Mobile Java Media (Graphics & Sounds) | 13 | 2003-10-15 03:38 |
| Uploading files (images) from phone | miniwanker | Browsing and Mark-ups | 1 | 2003-09-03 10:02 |
| Saving Phone Numbers | Nokia_Archive | Browsing and Mark-ups | 1 | 2002-05-17 04:13 |
| Saving Phone numbers/names | Nokia_Archived | General Browsing | 1 | 2002-05-16 20:42 |