Flamingo resizable icons from .ICO format
July 4th, 2008 | Comments OffJeff Friesen is a prolific Java desktop author on such sites as JavaWorld.com and InformIT.com, and his article on parsing .ico files and exposing the icon planes as BufferedImages. One of the areas mentioned in our JavaOne presentation on high-resolution monitors is scaling the application icons, and the org.jvnet.flamingo.common.icon.ResizableIcon interface aims to provide this support.
It was relatively easy to adapt Jeff’s code and create an implementation of ResizableIcon interface that loads .ico files and chooses the best icon plane for the specific size. The org.jvnet.flamingo.common.icon.IcoWrapperResizableIcon is the implementation and you can see how it is used in the test.imageviewer.IcoViewer.
Here is a screenshot of this application showing file icons from the Jordan Michael‘s portfolio under 128*128 size (click for the full view):
and here is the same application with the icon size changed to 256*256 (click for the full view):
The code for parsing the .ico format has been contributed by Jeff under the BSD license. The following must be referenced if you reuse this code in your application:
- Jeff Friesen name
- InformIT.com
- The original article itself.
Related posts:
- Disabled and themed icons in Substance 5.1 A few months ago, this posting on the Substance users mailing list has asked for...
- Flamingo SVG trancoder enhancements The demo applications for the Flamingo JRibbon component make heavy use of the SVG icons...
- Flamingo component suite 3.0 – the first drop After writing about the project vision and posting a few teaser screenshots, it’s finally time...
- Window / dock icon for ribbon frame in Flamingo 5.0 The application menu button in the ribbon component from Flamingo component suite is a big...