Examples of PngChunk


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

      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

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

  {
    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

    TransparencyFilter transparencyFilter = null;

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

    GammaCorrection gammaCorrection = null;
View Full Code Here

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

      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

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
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.