bos.write4Bytes(ICNS_MAGIC);
bos.write4Bytes(4 + 4 + 4 + 4 + 4 * imageType.getWidth()
* imageType.getHeight() + 4 + 4 + imageType.getWidth()
* imageType.getHeight());
bos.write4Bytes(imageType.getType());
bos.write4Bytes(4 + 4 + 4 * imageType.getWidth()
* imageType.getHeight());
for (int y = 0; y < src.getHeight(); y++) {
for (int x = 0; x < src.getWidth(); x++) {
final int argb = src.getRGB(x, y);