if (intent != null)
additional.put(PdfName.INTENT, intent);
if (additional.size() > 0)
img.setAdditional(additional);
if (icc_profile != null)
img.tagICC(icc_profile);
if (palShades) {
LwgImage im2 = LwgImage.getInstance(width, height, 1, 8, smask);
im2.makeMask();
img.setImageMask(im2);
}