This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186774

Summary: Cannot create a cached version of Icon when converting Image
Product: platform Reporter: mvfranz <mvfranz>
Component: -- Other --Assignee: issues@platform <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description mvfranz 2010-05-27 00:55:45 UTC
org.openide.util.ImageUtilities has many methods that create/convert images/icons.  Many images/icons are cached for re-use when created, but when images are converted to icons or icons converted to images, new instances are created without caching.  It seem fitting that the icon2Image and image2Icon  would also use cached images/icons.

An example use would be to use mergeImage and then wrap the Image in ImageIcon.  If image2Icon cached the resulting icon, multiple calls would not create multiple ImageIcons.
Comment 1 Victor Vasilyev 2010-05-28 13:04:41 UTC
Seems org.openide.util.ImageUtilities is a part of the platform, so I'll re-assign this issue. Please, evaluate this bug.