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 Dimension(image0.getWidth(), image0.getHeight());
}