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
Contributor
Posts: 27
Registered: ‎06-05-2010
My Device: Bold 9700
My Carrier: Rogers

JDE 4.3 image issue

[ Edited ]

Hi, I'm blown away with this random issue I'm seeing. Heres the situation:

 

I have a project and after building, the cod file is 23Kb. There are no images, only code.

 

I want to add 4 images to the project - each image is 80Kb.

 

I open up the project in JDE 4.2.1, add the images, build it - the cod file is now 33Kb.

 

I open up the project in JDE 4.3, add the images, build it - the cod file balloons to 384Kb. no joke. Smiley Mad

 

why, oh why do these things happen on BlackBerry randomly? Please help anyone, any ideas as to what could be going on would be really helpful.

 

I need to have two separate versions of the project, one in 4.2.1 and 4.3 since 4.3 introduces some additional functions. However, setting up the app for download ota is a hassle for the 4.3 build just cause now it has to be broken into multiple cod files. The images are in png format.

 

I realize it's not an 'end of the world' issue, but its just going to be inconvenient based on my circumstances. If theres a way I can reduce the size of the cod file, it would help a ton so hope someone can help me out. Thanks in advance.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: JDE 4.3 image issue

"I open up the project in JDE 4.2.1, add the images, build it - the cod file is now 33Kb."

 

Sorry I am skeptical.

 

The math doesn't work does it.  You can't package 4 * 80 + 23 into 33.  So unless this packaging has optimized your png files (which I don't think it does), then this build is not correct.

 

But 80 * 4 + 23 is pretty close to 384, so that makes sense to me. 

 

Talking of optimizing, you might be able to optimize the 80 KB png files and save some space.  For example reduce the color depth, I think it is only 16 bit color on the Blackberry. 

Contributor
Posts: 27
Registered: ‎06-05-2010
My Device: Bold 9700
My Carrier: Rogers

Re: JDE 4.3 image issue

which is the same reason I am blown away as well. Does 4.2.1 have an automatic compression or something goin on?

 

I'll try to reproduce it with HelloWorld for instance and try to attach some screenshots. I know it doesn;t make sense, but that's what I'm seeing. I add the images to the project in 4.2.1, build it, and the cod file size is only 33Kb (in spite of the images being 80Kb each)

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: JDE 4.3 image issue

How big is the jar file in each case?  an you see the images in the jar file?

Contributor
Posts: 27
Registered: ‎06-05-2010
My Device: Bold 9700
My Carrier: Rogers

Re: JDE 4.3 image issue

For the 4.2.1 build - the jar file is 328Kb, and I can see the images inside it

 

For the 4.3 build - the jar file is 614Kb, and I can also see the images inside it Smiley Frustrated

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: JDE 4.3 image issue

Ok, one final question before I go and try this myself.

 

Can you delete the jad generated for this application and then rebuild the application on 4.2.1.  Check the number of cod files listed in the jad.  Only 1?

Visitor
Posts: 1
Registered: ‎10-11-2010
My Device: Not Specified

Re: JDE 4.3 image issue

Hi, my name is Alessio.

I think I have the same problem. An application compiled with JDE 4.2 was 366kb .... now, with JDE 4.3, the size is incresead to 1.2MB.

Can someone help me?

Tnx, Alessio