Package org.apache.commons.imaging.formats.png.chunks

Examples of org.apache.commons.imaging.formats.png.chunks.PngChunkIdat


                } else if (chunkType == ChunkType.PLTE.value) {
                    result.add(new PngChunkPlte(length, chunkType, crc, bytes));
                } else if (chunkType == ChunkType.pHYs.value) {
                    result.add(new PngChunkPhys(length, chunkType, crc, bytes));
                } else if (chunkType == ChunkType.IDAT.value) {
                    result.add(new PngChunkIdat(length, chunkType, crc, bytes));
                } else if (chunkType == ChunkType.gAMA.value) {
                    result.add(new PngChunkGama(length, chunkType, crc, bytes));
                } else if (chunkType == ChunkType.iTXt.value) {
                    result.add(new PngChunkItxt(length, chunkType, crc, bytes));
                } else {
View Full Code Here


            throw new ImageReadException("PNG missing image data");
        }

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        for (PngChunk IDAT : IDATs) {
            final PngChunkIdat pngChunkIDAT = (PngChunkIdat) IDAT;
            final byte[] bytes = pngChunkIDAT.getBytes();
            // System.out.println(i + ": bytes: " + bytes.length);
            baos.write(bytes);
        }

        final byte[] compressed = baos.toByteArray();
View Full Code Here

TOP

Related Classes of org.apache.commons.imaging.formats.png.chunks.PngChunkIdat

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.