How to make JAR file as small as possible, when there are some PNG files and the mobile maximum JAR size is limit.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Robert_Huang
Posted On:   Tuesday, February 18, 2003 09:05 AM

Hello

We are the J2ME game developer, and meet the problem about JAR size now. Hope your sincerely help. Thank you very much.

Now we try to develope J2ME game for Nokia 7210 which only the maximum size for each JAR file is only 64K. Only a few PNG files will almost occupy the most of 64K.

1. How to deal with PNG file? From Photoshop to save as *.PNG?
2. How to make package to produce JAR file? I package from SUN Wireless Toolkit. But it seem not to reduce too much size. I find, if PNG files increase 10K, it almost increase 10K after packaging.

Thank for your reply.

Robert Huang

Re: How to make JAR file as small as possible, when there are some PNG files and the mobile maximum JAR size is limit.

Posted By:   Igor_Maznitsa  
Posted On:   Thursday, March 6, 2003 11:17 AM

For decreasing the Jar size you can use below ways:


1) Obfuscators... there are a lot of obfuscators in the market as free as commercial. I recommend use the commercial obfuscator JPresto (from S5Systems) but that obfuscator is no so cheap , about 1300 USD.



2) PNG files what are produced by Photoshop and CorelPhoto Paint are no so optimally packed and have redundant information, so you should use utilities for repacking and optimization of PNG files... I don't know their names because I have written my own packing tool for that... but I hope you will be able to find that in the net



The big size of JAR is not main problem in Nokia color phones... There is other biggest problem :( ... any pixel of unpacked PNG image in that phones will be take 12 bits...

Re: How to make JAR file as small as possible, when there are some PNG files and the mobile maximum JAR size is limit.

Posted By:   Lech_Migdal  
Posted On:   Tuesday, February 18, 2003 04:28 PM

Hi


There r few tips to reduce class size:

1. use obfuscator (there is one supported in wtk - retroguard)

2. dont use package names, put all classes into default package (I've saved 4kB this way)


And for PNG, these is already compressed version of picture, so you probably wont get much using zip on it (cause making jar = making zip archive).

My suggestion - lower number of details on images (maybe use less colours, but am not sure if it will help ;) ). And well, maybe you can live without one picture or two ? :)


Hope this helps :)

regards, Leszek

About | Sitemap | Contact