First of all, thanks for these two great tools. I'm developing J2ME games so one is happy to save as much as possible when it comes to JAR sizes. PNGout and kZip are doing a great job in downsizing :-)
As you may know when it comes to J2ME, you have to build your app for countless devices, so of course I created my own build environment to ease this job. This process already makes use of PNGout and kZip, but I ran into problems because one can't check the exit values of those tools - it's always 0 no matter if something went wrong. While this is no problem for a single build process (you just read what was going on), it's hard to tell if there was an error if you do 50 targets in a row.
Would it be possible to let PNGout and kZip return 0 ONLY when no error occured?
And it would be so nice to have that /q switch for kZip as well :-)
Thanks in advance,
psi
Awesoken at
Those are all good suggestions - things I should have done all along. : ) I have implemented /q in KZIP and added more useful return values to KZIP and PNGOUT. Now, they return 0 for success, and -1 upon error. I made "unable to compress further" return a 0 because there is no purpose in running the compressor again when you get that (at least with the same parameters).
psi at
Wow - that was quick ;-)
Thanks alot, I just tested both and everything works as expected so far. To make "unable to compress further" return 0 is (from my point of usage at least) a perfect solution.
There's just one last suggestion (I promise!) for the new /q switch in kZip: Errors should still be reported, so you know what was wrong - just as PNGout already does.
Awesoken at
Your request is illogical. PNGOUT doesn't print anything when you specify /q - not even errors. So I guess that means I have nothing to do? Besides, my feeling is that quiet should mean quiet. If you want to see the error messages, then I suggest you figure out how to pipe PNGOUT's output to your application and filter as needed.
Edited at
psi at
I guess you are right, quiet should be quiet, and it's easy to filter output with the return codes now.
It was just a quick test with PNGout when I ran it on some non-image file in quiet mode, it would still print "unsupported format". I guess for other errors it really is quiet :-)