Share

JSmooth

Tracker: Feature Requests

5 32bit .ico support - ID: 1835518
Last Update: Comment added ( musicmanj )

Hi,

I've been using jsmooth for a while now, and use it for several different
java applications.

There is one small improvment I think would help applications look better.
If there was support for 32bit .ico files, with 8bit alpha values
(currently 1 bit), much more attractive icons could be used.

Ther current error message is:
java.lang.Exception: Unsupported ICO color depth: 32

Thanks,
James


James David Low ( musicmanj ) - 2007-11-21 01:26

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 18 )




Date: 2009-11-25 00:13
Sender: musicmanjSourceForge.net Donor

Just compiled using your version. I had to recompile, because your library
was for a new version of Ant I think, so wasn't working with whatever I
have.


Date: 2009-11-24 23:30
Sender: mguessanAccepting Donations

I have: your class works perfectly with my patch: we now have full vista
icon support in Jsmooth.

Source code available in DavMail subversion...

Now we need to find an admin to commit the patch and release a new version
:-)


Date: 2009-10-20 08:33
Sender: nobody

No, i haven't yet tested it with your classes


Date: 2009-10-19 21:44
Sender: mguessanAccepting Donations

Great work, seems to do more than my initial fix.
Did you try your code with my other classes ?


Date: 2009-10-16 22:39
Sender: h3r3

I uploaded it here:
https://sourceforge.net/tracker/?func=detail&aid=2880800&group_id=86730&atid=580677


Date: 2009-10-16 22:12
Sender: h3r3

Hi, i didn't know that someone had already implemented 32 bit icon support,
so i started doing the same thing, i added all missing image formats to
IcoCodec.java
(24 bit icons, 32 bit icons, Vista PNG icons)

My code alone is not enough anyway, as i wold have to modify also the
other files as mguessan did.

Anyway, I can send my version of IcoCodec.java to anyone asks me.

I'm very sorry that this wonderful project seem abandoned...


Date: 2009-10-03 01:47
Sender: musicmanjSourceForge.net Donor

I've moved my changes to here:
http://code.google.com/p/jamesdlow/source/browse/#svn/trunk/Sourceforge/jsmooth


Date: 2008-12-05 15:22
Sender: mguessanAccepting Donations

Confirmed, I tested only XP icons, it would be great to also have reliable
Vista support.

Do you think it would be possible to add more than one icon size to the
generated exe ?



Date: 2008-10-12 21:34
Sender: reyesProject Admin

Thanks for the patch. I'm currently making some tests with it, but most of
the vista icons I can find (from the intertube) just break (or rather throw
an exception), because it appears that now the ICO format also accepts
embedded PNG data, which is currently not supported at all by my code.

I must admit that the ICO support has always been pretty minimal on
jsmooth, and I'd like to make some tests with the new ICO format before
integrating new code. An option I'd like to explore would be to integrate
with http://image4j.sourceforge.net/ or another library decoding/encoding
the ico format (none existed, to my knowledge, when I started jsmooth in
2003).



Date: 2008-10-09 00:30
Sender: musicmanjSourceForge.net Donor

I've put a version of my binary here:
http://code.google.com/p/limegreen/downloads/list


Date: 2008-10-02 00:29
Sender: musicmanjSourceForge.net Donor

hmmm, I had a 128x128 with your code and it still killed the transparency.
For now I've added this to the list of sizes that it accepts, but the image
still doesn't looke quite as good as I'd like. Its better than the standard
jsmooth though.

Thanks for your help!


Date: 2008-10-01 10:05
Sender: mguessanAccepting Donations

On compilation :
- I compiled the jar under java 1.6, which will trigger the class version
error with previous versions
- you also need to compile jnismooth.jar under skeletons/jnismooth first
to get jsmooth.Native

On quality :
- my patch worked only with 32x32 pixels icons, with other sizes, jsmooth
breaks transparency with Image.getScaledImage
see
http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html
- I changed ExeCompiler to use the method provided in the above article to
fix this.



Date: 2008-10-01 06:54
Sender: musicmanjSourceForge.net Donor

Ok final comment, its great that I can now use 32bit version of the icons
and it doesn't through an error if I try, but they still appear low
quality, at least in windows XP, am I doing something wrong?


Date: 2008-10-01 06:48
Sender: musicmanjSourceForge.net Donor

File Added: src.zip


Date: 2008-10-01 06:46
Sender: musicmanjSourceForge.net Donor

Ok, sorry for all the updates. I'm managed to compile my own version from
your patch to the jsmooth source (see src.zip) that works with my version
of Ant. But I had to comment out the followings lines in HTMLPane.java to
get it to compile.

/*if (jsmooth.Native.isAvailable())
{
jsmooth.Native.shellExecute(jsmooth.Native.SHELLEXECUTE_OPEN,
nurl.toString(), null, null, jsmooth.Native.SW_NORMAL);
}
else
*/


Date: 2008-10-01 02:50
Sender: musicmanjSourceForge.net Donor

Hi, actually I went to your davmail project on sourceforge and download the
patched version of your jsmoothgen-ant jar.

I have a problem running it with my version of ant (1.6.5) and get the
following error: java.lang.UnsupportedClassVersionError: Bad version number
in .class file

What version of the ant task definition libraries did you compile against?
Any possibility for you to try against an older version?


Date: 2008-10-01 02:07
Sender: musicmanjSourceForge.net Donor

Hi mguessan, sounds great!

I'm not sure if this project is being that actively maintained. It would
be great if it was, and a new version could be released with this patch.

But if its not, do you have binary version of yout patch somewhere
avaliable for download?

I'm using jsmooth as part of a cross platform java project template I'm
developing. http://code.google.com/p/limegreen I consider launch4j, but
jsmooth was just heaps easier to use, and didn't require different binaries
to run the ant task on different operating systems.

Thanks,
James


Date: 2008-09-30 23:17
Sender: mguessanAccepting Donations

I use Jsmooth on Davmail, this tool is just great (single process, easy to
use, ant task...).

Yet I noticed that the exe icon does not take alpha channel into account.

I wrote a small patch to add 32 bit icon to Jsmooth :
- changed icocodec to load 32 bits ico images
- created a ResIcon32 class to handle exe resource output
- also had to patch ExeCompiler and ExecutableIcon to use ImageIO to load
png images and call ResIcon32 for output


Log in to comment.




Attached File ( 1 )

Filename Description Download
src.zip Patch to jsmooth for 32bit icons from Davmail Download

Change ( 1 )

Field Old Value Date By
File Added 295583: src.zip 2008-10-01 06:48 musicmanj