UCWare IconTools for the Java™ platform
Reading Windows ICO files in Java
If you need to read a Windows ICO file from Java,
UCWare IconTools for the Java platform may come in handy.
UCWare IconTools lets you read an icon into memory with
just one line of code:
Icon[] icons = IconTools.readIcons(new File("C:\\my.ico"));
As the result, you get an array of objects that implement
the javax.swing.Icon interface.
javax.swing.Icon allows for using icons throughout
Swing (for instance, you can set icons on JButtons),
and also in Java2D for obtaining BufferedImages, and so on.
UCWare IconTools supports multi-resolution icons
with varying color depths, and also supports alpha channel transparency.
The following code snippet
will display all icons from a single file as buttons:
contentPane = (JPanel) getContentPane();
pane.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
setTitle("DemoReader");
Icon[] ic = IconTools.readIcons(new File(args[0]));
for (int i = 0; i < ic.length; i++)
{
Icon icon = ic[i];
IcoIcon iic = (IcoIcon) icon;
String inf = iic.getIconWidth()+"x"+iic.getIconHeight()
+"@"+iic.getBiBitCount();
pane.add(new JButton(inf, icon));
}
contentPane.add(pane);
Here are the on-screen results:
Javadoc documentation for UCWare IconTools is available here.
See also
System Requirements
- Java™ Runtime Environment version 1.3.1 or higher.
Online ordering
UCWare IconTools for the Java™ platform can be ordered online.
Our secure online retailer is
Plimus Corporation, Inc.
- Single User License ($35.00)
- a per-user royalty-free license for general commercial use,
allows for installation on multiple machines of a lone user.
This license grants you the right to distribute the UCWare IconTools run-time library (icontools.jar) file,
in obfuscated form as a runtime component of your own programs without fee.
After ordering, you will receive an uniqu link by e-mail to download your copy of the software.
CD-ROM available for an additional 9.90 USD (includes shipping).
A CD-ROM will be shipped to you by Plimus.
There is no difference between the download
and the CD-ROM product.
When you download, you get exactly the same software that comes on the CD-ROM.
Price list
| Product |
Price |
|
|
UCWare IconTools for the Java™ platform - Full Version 1.2 with Single User License (#2271072)
|
$35.00
|
|
|
UCWare IconTools for the Java™ platform - Full Version 1.2 with Corporate License (per workstation licensing) (#2271102)
|
$35.00 per workstation
|
|
If you have placed an order but have not received a confirmation
letter and registration key within a reasonable period (two business days
for credit card payments or two weeks for other payment methods)
then please notify us via e-mail at
support@ucware.com.
If you have any questions or concerns, please feel free to contact us at
support@ucware.com.