return new BitmapIconData(fIconInfo, header, resultImage);
}
private IconData readIconData(final byte[] iconData, final IconInfo fIconInfo)
throws ImageReadException, IOException {
final ImageFormat imageFormat = Imaging.guessFormat(iconData);
if (imageFormat.equals(ImageFormats.PNG)) {
final BufferedImage bufferedImage = Imaging.getBufferedImage(iconData);
return new PNGIconData(fIconInfo, bufferedImage);
}
return readBitmapIconData(iconData, fIconInfo);
}