/** * @see com.itextpdf.text.pdf.PdfContentByte#addImage(com.itextpdf.text.Image, float, float, float, float, float, float) */ public void addImage(Image image, float a, float b, float c, float d, float e, float f) throws DocumentException { if (stencil && !image.isMask()) checkNoColor(); super.addImage(image, a, b, c, d, e, f); }
/** * @see com.itextpdf.text.pdf.PdfContentByte#addImage(com.itextpdf.text.Image, float, float, float, float, float, float) */ public void addImage(Image image, float a, float b, float c, float d, float e, float f) throws DocumentException { if (stencil && !image.isMask()) checkNoColor(); super.addImage(image, a, b, c, d, e, f); }
public void addImage(Image image, float a, float b, float c, float d, float e, float f, boolean inlineImage) throws DocumentException { if (!colorized && (!image.isMask() || !(image.getBpc() == 1 || image.getBpc() > 0xff))) throw new DocumentException(MessageLocalization.getComposedMessage("not.colorized.typed3.fonts.only.accept.mask.images")); super.addImage(image, a, b, c, d, e, f, inlineImage); }
public void addImage(Image image, float a, float b, float c, float d, float e, float f, boolean inlineImage) throws DocumentException { if (!colorized && (!image.isMask() || !(image.getBpc() == 1 || image.getBpc() > 0xff))) throw new DocumentException(MessageLocalization.getComposedMessage("not.colorized.typed3.fonts.only.accept.mask.images")); super.addImage(image, a, b, c, d, e, f, inlineImage); }
if (image.getLayer() != null) put(PdfName.OC, image.getLayer().getRef()); if (image.isMask() && (image.getBpc() == 1 || image.getBpc() > 0xff)) put(PdfName.IMAGEMASK, PdfBoolean.PDFTRUE); if (maskRef != null) { put(PdfName.MASK, maskRef); if (image.isMask() && image.isInverted()) put(PdfName.DECODE, new PdfLiteral("[1 0]")); if (image.isInterpolation()) if (transparency != null && !image.isMask() && maskRef == null) { StringBuilder s = new StringBuilder("["); for (int k = 0; k < transparency.length; ++k) int bpc = image.getBpc(); if (bpc > 0xff) { if (!image.isMask()) put(PdfName.COLORSPACE, PdfName.DEVICEGRAY); put(PdfName.BITSPERCOMPONENT, new PdfNumber(1)); if (additional != null) putAll(additional); if (image.isMask() && (image.getBpc() == 1 || image.getBpc() > 8)) remove(PdfName.COLORSPACE); put(PdfName.BITSPERCOMPONENT, new PdfNumber(image.getBpc()));
if (image.getLayer() != null) put(PdfName.OC, image.getLayer().getRef()); if (image.isMask() && (image.getBpc() == 1 || image.getBpc() > 0xff)) put(PdfName.IMAGEMASK, PdfBoolean.PDFTRUE); if (maskRef != null) { put(PdfName.MASK, maskRef); if (image.isMask() && image.isInverted()) put(PdfName.DECODE, new PdfLiteral("[1 0]")); if (image.isInterpolation()) if (transparency != null && !image.isMask() && maskRef == null) { StringBuilder s = new StringBuilder("["); for (int k = 0; k < transparency.length; ++k) int bpc = image.getBpc(); if (bpc > 0xff) { if (!image.isMask()) put(PdfName.COLORSPACE, PdfName.DEVICEGRAY); put(PdfName.BITSPERCOMPONENT, new PdfNumber(1)); if (additional != null) putAll(additional); if (image.isMask() && (image.getBpc() == 1 || image.getBpc() > 8)) remove(PdfName.COLORSPACE); put(PdfName.BITSPERCOMPONENT, new PdfNumber(image.getBpc()));