09-24-2008 01:28 PM
Is there anyway to look at the contents of a cod file ( what utilities are there)?
I need a <65k app and was doing fine until I swapped out an image.
I'm invoking rapc from the comman line and compiling everything just fine and including an image, Phlash.png. I have several
$ convert grassyknoll.gif -resize 320x240\! Phlash.png
$ ls -al Phla*
-rw-r--r-- 1 Administrator None 5452 Sep 24 12:33 Phlash.jpg
-rw-r--r-- 1 Administrator None 32811 Sep 24 13:30 Phlash.png
-rw-r--r-- 1 Administrator None 30194 Sep 24 09:53 Phlash_real.png
If I copy the "_real" image into Phlash.png, everything is fine. If I use the slightly larger
image OR copy the 5j jpg into Phlash.png, the cod file size explodes by 20-30k.
Phlash_real is slighly more white space than the other one so it may compress better but the
5k jpg file is a mystery unless someone tried to transcode it.
09-24-2008 03:17 PM
09-24-2008 03:34 PM
I'm doing this from the command line and just including the file name on the command line. I would have guessed
some other app would transcode and, anyway, it seems the original file is in the jar. Do you know how I can disable
from the command line ? I'm not sure I have a project handy that I can exmaine in the IDE to see what it does with this option.
In any case, there is no evidence of transcoding in the far file as the original image seems to be there.
Is there a utility to actually see what is in the cod file?
09-25-2008 09:01 AM
There -noconvertpng switch tells rapc not to convert images to PNG format.
There is no utility to examine the contents of a cod file.
09-25-2008 09:11 AM
Thanks I'll give that a try but I was able to work around using imagemagic and make a smaller image and add a border
that apparently compresses well,
533 convert grassyknoll.gif -resize 160x120 -frame 80x60\! Phlashf.png
534 identify Phlashf.png
Phlashf.png PNG 280x240+0+0 DirectClass 10kb 0.010u 0:01
Is the cod file format outlined anywhere?
I was able to "find" something about convertpng in your compiler class, fwiw,
$ strings Compiler.class | grep -B 5 -A 5 conv
09-25-2008 10:22 AM