Package org.apache.xmlgraphics.image.codec.png

Examples of org.apache.xmlgraphics.image.codec.png.PNGChunk


            throw new ImageException(msg);
        }
        // only some chunks are worth parsing in the current implementation
        do {
            try {
                PNGChunk chunk;
                String chunkType = PNGChunk.getChunkType(distream);
                if (chunkType.equals(PNGChunk.ChunkType.IHDR.name())) {
                    chunk = PNGChunk.readChunk(distream);
                    parse_IHDR_chunk(chunk);
                } else if (chunkType.equals(PNGChunk.ChunkType.PLTE.name())) {
                    chunk = PNGChunk.readChunk(distream);
                    parse_PLTE_chunk(chunk);
                } else if (chunkType.equals(PNGChunk.ChunkType.IDAT.name())) {
                    chunk = PNGChunk.readChunk(distream);
                    streamVec.add(new ByteArrayInputStream(chunk.getData()));
                } else if (chunkType.equals(PNGChunk.ChunkType.IEND.name())) {
                    // chunk = PNGChunk.readChunk(distream);
                    PNGChunk.skipChunk(distream);
                    break; // fall through to the bottom
                } else if (chunkType.equals(PNGChunk.ChunkType.tRNS.name())) {
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.image.codec.png.PNGChunk

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.