| Reply | « Previous Thread | Next Thread » |
|
I stumbled into a png class which has a method that returns a PNG formatted byte array. Unfortunately the author did not elaborate on the parameters. As I have been looking for a means of saving an image as a PNG in J2ME for a very long time I am very eager to learn the posted source code. However I cannot seem to fully understand since the author did not explain what kinds of parameters the method requires. Can anyone help me on this? Here is the link to the source code:
http://www.j2meforums.com/wiki/index.php/PNG_class |
|
Hello pmgf_14,
I also like to create a image file from a bytearray with the rgb-values. But as far I understand the code, it does not does this, but only the opposite. The following method: static Image create(int width, int height, ....) uses the structure of a png file as input, and returns an J2ME-Image. But the J2ME-Image class has no save() or getFileData() method, so this does not help us. Maybe you can change the method, because it seems to create the right structure in the bytearray "data". So maybe you can use this bytearray and write it to a file. I you find any other options, please post them here. Regards Karsten Meier |
|
Yes i know that. you can rewrite the method and instead of returning an Image you can return the byte array in the right format.
My problem however is that i dont know how to get the palette chunk and pass it to the method static Image create(int width, int height, ....) |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Issue when trying to generate .sis file | rmulam | Symbian Tools & SDKs | 9 | 2009-08-13 15:10 |
| need information about j2me polish | rathikathangaraj | Mobile Java General | 4 | 2007-12-19 10:01 |
| Why should Document hold engines/models and not AppUI? | nawkboy | General Symbian C++ | 2 | 2007-03-14 18:15 |
| 21 errors in j2me , help in soving them | abhishek_1211 | General Messaging | 0 | 2006-04-01 10:04 |
| Exceptions while loading application | avinash_rs | Mobile Java General | 0 | 2003-06-09 11:53 |