Package org.apache.commons.imaging.common

Examples of org.apache.commons.imaging.common.PackBits


                final int index = channel * height + y;
                final byte[] packed = BinaryFunctions.readBytes("scanline",
                        is, scanlineBytecounts[index],
                        "PSD: Missing Image Data");

                final byte[] unpacked = new PackBits().decompress(packed, width);
                final InputStream bais = new ByteArrayInputStream(unpacked);
                final MyBitInputStream mbis = new MyBitInputStream(bais, ByteOrder.BIG_ENDIAN);
                BitsToByteInputStream bbis = null;
                boolean canThrow = false;
                try {
View Full Code Here


            return myLzwDecompressor.decompress(is, expectedSize);
        }

        case TIFF_COMPRESSION_PACKBITS: // Packbits
        {
            return new PackBits().decompress(compressed, expectedSize);
        }

        default:
            throw new ImageReadException("Tiff: unknown/unsupported compression: " + compression);
        }
View Full Code Here

                strips[i] = T4AndT6Compression.compressT6(strips[i], width,
                        strips[i].length / ((width + 7) / 8));
            }
        } else if (compression == TIFF_COMPRESSION_PACKBITS) {
            for (int i = 0; i < strips.length; i++) {
                strips[i] = new PackBits().compress(strips[i]);
            }
        } else if (compression == TIFF_COMPRESSION_LZW) {
            for (int i = 0; i < strips.length; i++) {
                final byte[] uncompressed = strips[i];
View Full Code Here

TOP

Related Classes of org.apache.commons.imaging.common.PackBits

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.