Project: SWT
Bug 78226 [JFace] ImageCache.getImage failing to return an image for ico file (regression)
Reported: 2004-11-09 16:37:07 | Status: resolved fixed

Having just installed 3.1 M3, we have discovered that this code Image image = null; String iconPath = "icons/someicon.ico"; File f = new File(iconPath); ImageDescriptor desc = ImageDescriptor.createFromFile (InfrastructurePlugin.class, f.getPath()); if (desc != null) { //obtain the cached image corresponding to the descriptor image = m_ImageCache.getImage(desc); } } return image; works in 3.1 M2 if iconPath references a gif or an ico file. But only works in 3.1 M3 if the iconPath is a gif. No longer working for icons.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java