Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 80
Registered: ‎03-19-2009
My Device: Not Specified

How to optimize cod file size ?

[ Edited ]
My app have many images (about 500k). I compile by JDE 4.5: cod file size = 900k;   by JDE 4.2, 4.6.1, 4.7 : cod file size = 1800k. Share your idea with me. Thanks very much ! Smiley Indifferent
Message Edited by ldbbdevelopervn on 07-21-2009 11:31 PM

PPCLINK Blackberry Team
The Best Software for Smartphone World.
Website : www.ppclink.com
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to optimize cod file size ?

Use images in *.png format.

 

Also apply PNGOUT utility to all png images you have:

 

http://advsys.net/ken/util/pngout.exe

 

It will reduce the file sizes but preserve the quality.

 

Check that and post here - how much space does it save for you.

Developer
Posts: 80
Registered: ‎03-19-2009
My Device: Not Specified

Re: How to optimize cod file size ?

All images was PNG format. I want to know why : compile with JDE 4.5 --> 900k, compile JDE 4.2, 2.6.1, 4.7 --> 1800k. What is difference ? Thanks !

PPCLINK Blackberry Team
The Best Software for Smartphone World.
Website : www.ppclink.com
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to optimize cod file size ?

I am not related to rapc compiler development Smiley Happy

 

Seems that JDE 4.5 uses more optimization techniques than older JDE versions.

 

Try to apply pngout on your png files and check the space delta, before and after pngout usage.

Developer
Posts: 108
Registered: ‎01-29-2009
My Device: BlackBerry 8700g
My Carrier: Tigo

Re: How to optimize cod file size ?

Hi,

 

I have an application with a size of 2 Mb. This application have again twelve (12) cod files.

 

THE SOLUTION

 

You need install the Macromedia fir  or later and open the files with any extensions. You will save the any image in .PNG Flattened format, with this method is FANTASTIC, because the icon or image with 65 KB this format convert to 7 KB, yes 7KB.

 

With this option your application will have minor size. The important, The quality of your images is the same.

 

If you have any questions, let me know.

 

I will help to you remotly for compress your image.

 

Thanks

Jorge Luis

 

 

Jorge Luis Frias B

Leader on Development
BlackBerry/iPhone Technologies
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to optimize cod file size ?

Jorge, do you mean Macromedia Fireworks ?
Developer
Posts: 108
Registered: ‎01-29-2009
My Device: BlackBerry 8700g
My Carrier: Tigo

Re: How to optimize cod file size ?

Macromedia Fireworks permit save the file png in format png flattenend with size small.

 

Obviously, that the code of the applications will be well structured and development with correct metrics forreduce the size of applications.

 

My tip is  refering to the size of images in development applications.

 

Thanks.

Jorge Luis Frias B

Leader on Development
BlackBerry/iPhone Technologies
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to optimize cod file size ?

Making from 65 Kb 7 Kb file.

 

That's very cool.

 

Could you please attach here original big png file and processed by Fireworks small png file?

 

It would be great to view it.

 

Thank you.

Developer
Posts: 108
Registered: ‎01-29-2009
My Device: BlackBerry 8700g
My Carrier: Tigo

Re: How to optimize cod file size ?

Hi guys,

 

The original file with 55 KB

 

 

 

The same file converted to 8 kb

 

 

If you or your company need design graphic for applications blackberry let me know.

 


Thanks

Jorge Luis

Nerds On Site

jorge@nerdsonsite.com

www.nerdsonsite.com

 

Jorge Luis Frias B

Leader on Development
BlackBerry/iPhone Technologies
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to optimize cod file size ?

Thank you for samples, Jorge Smiley Happy

 

Check the image below, it produced by PngOut from 55 K png image. It's size is 3427 bytes Smiley Happy

 

file_4kb.png