Package org.apache.sanselan.formats.png.chunks

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


                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

    {
        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

        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

        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

            if ((chunks.size() < 1))
                return false;

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

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

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

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

  {
    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

    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

    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

Related Classes of org.apache.sanselan.formats.png.chunks.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.