Examples of PngChunk


Examples of ar.com.hjg.pngj.chunks.PngChunk

      if (ch.isInterlaced())
        deinterlacer = new Deinterlacer(imageInfo);
      chunksList = new ChunksList(imageInfo);
    }
    if (chunkR.mode == ChunkReaderMode.BUFFER || includeNonBufferedChunks) {
      PngChunk chunk = chunkFactory.createChunk(chunkR.getChunkRaw(), getImageInfo());
      chunksList.appendReadChunk(chunk, currentChunkGroup);
    }
    if (isDone()) {
      processEndPng();
    }
View Full Code Here

Examples of ar.com.hjg.pngj.chunks.PngChunk

      if (ch.isInterlaced())
        deinterlacer = new Deinterlacer(imageInfo);
      chunksList = new ChunksList(imageInfo);
    }
    if (chunkR.mode == ChunkReaderMode.BUFFER || includeNonBufferedChunks) {
      PngChunk chunk = chunkFactory.createChunk(chunkR.getChunkRaw(), getImageInfo());
      chunksList.appendReadChunk(chunk, currentChunkGroup);
    }
    if (isDone()) {
      processEndPng();
    }
View Full Code Here

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

                } 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 {
                    result.add(new PngChunk(length, chunkType, crc, bytes));
                }

                if (returnAfterFirst) {
                    return result;
                }
View Full Code Here

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

        TransparencyFilter transparencyFilter = null;

        final List<PngChunk> tRNSs = filterChunks(chunks, ChunkType.tRNS);
        if (!tRNSs.isEmpty()) {
            final PngChunk pngChunktRNS = tRNSs.get(0);
            transparencyFilter = getTransparencyFilter(pngChunkIHDR.colorType, pngChunktRNS);
        }

        ICC_Profile iccProfile = null;
        GammaCorrection gammaCorrection = null;
View Full Code Here

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

        if ((chunks.isEmpty())) {
            return false;
        }

        for (int i = 0; i < chunks.size(); i++) {
            final PngChunk chunk = chunks.get(i);
            printCharQuad(pw, "\t" + i + ": ", chunk.chunkType);
        }

        pw.println("");
View Full Code Here

Examples of org.apache.sanselan.formats.png.chunks.PNGChunk

     */
    public List getChuckTypes(InputStream is) throws ImageReadException, IOException {
        List chunks = readChunks(is, null, false);
        List chunkTypes = new ArrayList();
        for (int i=0; i<chunks.size(); i++) {
            PNGChunk chunk = (PNGChunk) chunks.get(i);
            chunkTypes.add(getChunkTypeName(chunk.chunkType));
        }
        return chunkTypes;
    }
View Full Code Here

Examples of org.apache.sanselan.formats.png.chunks.PNGChunk

                else if (chunkType == gAMA)
                    result.add(new PNGChunkgAMA(length, chunkType, CRC, bytes));
                else if (chunkType == iTXt)
                    result.add(new PNGChunkiTXt(length, chunkType, CRC, bytes));
                else
                    result.add(new PNGChunk(length, chunkType, CRC, bytes));

                if (returnAfterFirst)
                    return result;
            }
View Full Code Here

Examples of org.apache.sanselan.formats.png.chunks.PNGChunk

    {
        ArrayList result = new ArrayList();

        for (int i = 0; i < v.size(); i++)
        {
            PNGChunk chunk = (PNGChunk) v.get(i);
            if (chunk.chunkType == type)
                result.add(chunk);
        }

        return result;
View Full Code Here

Examples of org.apache.sanselan.formats.png.chunks.PNGChunk

        ArrayList IHDRs = filterChunks(chunks, IHDR);
        if (IHDRs.size() != 1)
            throw new ImageReadException("PNG contains more than one Header");

        PNGChunkIHDR pngChunkIHDR = (PNGChunkIHDR) IHDRs.get(0);
        PNGChunk pngChunktRNS = null;

        boolean isTransparent = false;

        ArrayList tRNSs = filterChunks(chunks, tRNS);
        if (tRNSs.size() > 0)
View Full Code Here

Examples of org.apache.sanselan.formats.png.chunks.PNGChunk

        TransparencyFilter transparencyFilter = null;

        ArrayList tRNSs = filterChunks(chunks, tRNS);
        if (tRNSs.size() > 0)
        {
            PNGChunk pngChunktRNS = (PNGChunk) tRNSs.get(0);
            transparencyFilter = getTransparencyFilter(pngChunkIHDR.colorType,
                    pngChunktRNS);
        }

        ICC_Profile icc_profile = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.