UCWare.com

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.

Buy a License

UCWare IconTools is priced per computer. Read the license agreement for details.

Commercial license allows for:

  • Reproduction and distribution, in binary form only, of the programs created using the Software with Runtime without additional license or fees;
  • Perpetual use of the purchased version of UCWare IconTools;
  • Unlimited technical support via e-mail;
  • Free upgrades during the first year following your purchase.

UCWare IconTools can be ordered online using a credit card. Our secure online retailer is Emetrix.
Customer service toll free (US and Canada): 888-447-1175
Customer service international: +1 952-646-5558
Fax#: +1 801-497-9456

Product
Delivery
Price
 
UCWare IconTools 1.1 Single User License (#10385034)
(Means the Licensee is the individual; not a corporation, company, partnership or other entity or organization)
Electronic
$35.00
UCWare IconTools 1.1 Corporate License (#10437867)
(licensed per computer)
Electronic
$135.00
per computer

In addition to secure online ordering by credit card, you can place an order by phone (toll free), fax, mail or purchase order.

Our sales agent, Emetrix, will send you the download link for the full version of UCWare IconTools immediately after your payment is received. You will also receive a license certificate from support@ucware.com within two business days.

Per computer licensing: You can install UCWare IconTools on the number of workstations that corresponds to the number of licenses purchased;

Cross-platform compatibility: You can use the same UCWare IconTools license on different operating systems, provided that it is not used concurrently.

Perpetual ownership: Your license to use the purchased version of UCWare IconTools is perpetual. No annual renewal is required.

If you have any questions or concerns, please feel free to contact us at support@ucware.com.