IcnsContents contents = readImage(byteSource);
ArrayList images = IcnsDecoder.decodeAllImages(contents.icnsElements);
if (images.isEmpty())
throw new ImageReadException("No icons in ICNS file");
BufferedImage image0 = (BufferedImage) images.get(0);
return new ImageInfo("Icns", 32, new ArrayList(), ImageFormat.IMAGE_FORMAT_ICNS,
"ICNS Apple Icon Image", image0.getHeight(), "image/x-icns", images.size(),
0, 0, 0, 0, image0.getWidth(), false, true, false, ImageInfo.COLOR_TYPE_RGB,
ImageInfo.COMPRESSION_ALGORITHM_UNKNOWN);
}