Class ImagePdfBytesInfo


  • class ImagePdfBytesInfo
    extends java.lang.Object
    • Field Detail

      • TIFFTAG_SOFTWARE_VALUE

        private static final java.lang.String TIFFTAG_SOFTWARE_VALUE
      • bpc

        private final int bpc
      • width

        private final int width
      • height

        private final int height
      • colorspace

        private final PdfObject colorspace
      • pngColorType

        private int pngColorType
      • pngBitDepth

        private int pngBitDepth
      • palette

        private byte[] palette
      • icc

        private byte[] icc
      • stride

        private int stride
    • Constructor Detail

      • ImagePdfBytesInfo

        public ImagePdfBytesInfo​(PdfImageXObject imageXObject)
    • Method Detail

      • getPngColorType

        public int getPngColorType()
      • decodeTiffAndPngBytes

        public byte[] decodeTiffAndPngBytes​(byte[] imageBytes)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • processSeperationColor

        private byte[] processSeperationColor​(byte[] imageBytes,
                                              PdfArray colorSpaceArray)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • processPng

        private byte[] processPng​(byte[] imageBytes,
                                  int pngBitDepth,
                                  int pngColorType)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • findColorspace

        private void findColorspace​(PdfObject csObj,
                                    boolean allowIndexed)
        Sets state of this object according to the color space
        Parameters:
        csObj - the colorspace to use
        allowIndexed - whether indexed color spaces will be resolved (used for recursive call)
        Throws:
        java.io.IOException - if there is a problem with reading from the underlying stream