Package org.apache.sanselan

Examples of org.apache.sanselan.FormatCompliance


  }

  public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
      throws ImageReadException, IOException
  {
    FormatCompliance formatCompliance = FormatCompliance.getDefault();
    TiffContents contents = new TiffReader(isStrict(params)).readFirstDirectory(byteSource,
        params, true, formatCompliance);
    TiffDirectory directory = (TiffDirectory) contents.directories.get(0);
    BufferedImage result = directory.getTiffImage(params);
    if (null == result)
View Full Code Here


  }

  public FormatCompliance getFormatCompliance(ByteSource byteSource)
      throws ImageReadException, IOException
  {
    FormatCompliance result = new FormatCompliance(byteSource
        .getDescription());

    readImageContents(byteSource.getInputStream(), result);

    return result;
View Full Code Here

  }

  public FormatCompliance getFormatCompliance(ByteSource byteSource)
      throws ImageReadException, IOException
  {
    FormatCompliance result = new FormatCompliance(byteSource
        .getDescription());

    readFile(byteSource, false, result);

    return result;
View Full Code Here

  }

  public FormatCompliance getFormatCompliance(ByteSource byteSource)
      throws ImageReadException, IOException
  {
    FormatCompliance result = new FormatCompliance(byteSource
        .getDescription());

    readFile(byteSource, false, result);

    return result;
View Full Code Here

    InputStream is = null;
    try
    {
      is = byteSource.getInputStream();

      FormatCompliance formatCompliance = null;
      GIFHeaderInfo ghi = readHeader(is, formatCompliance);

      byte globalColorTable[] = null;
      if (ghi.globalColorTableFlag)
        globalColorTable = readColorTable(is,
View Full Code Here

  public FormatCompliance getFormatCompliance(ByteSource byteSource)
      throws ImageReadException, IOException
  {
    boolean verbose = false;

    FormatCompliance result = new FormatCompliance(byteSource
        .getDescription());

    readImageContents(byteSource.getInputStream(), result, verbose);

    return result;
View Full Code Here

  {
    try
    {
      ByteSource byteSource = new ByteSourceArray(exifBytes);
      Map params = null;
      FormatCompliance formatCompliance = FormatCompliance.getDefault();
      TiffContents contents = new TiffReader(false).readContents(byteSource,
          params, formatCompliance);

      ArrayList elements = new ArrayList();
      //      result.add(contents.header); // ?
View Full Code Here

  }

  public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
      throws ImageReadException, IOException
  {
    FormatCompliance formatCompliance = FormatCompliance.getDefault();
    TiffContents contents = new TiffReader(isStrict(params))
        .readFirstDirectory(byteSource, params, false, formatCompliance);
    TiffDirectory directory = (TiffDirectory) contents.directories.get(0);

    TiffField field = directory.findField(EXIF_TAG_ICC_PROFILE);
View Full Code Here

  }

  public Dimension getImageSize(ByteSource byteSource, Map params)
      throws ImageReadException, IOException
  {
    FormatCompliance formatCompliance = FormatCompliance.getDefault();
    TiffContents contents = new TiffReader(isStrict(params))
        .readFirstDirectory(byteSource, params, false, formatCompliance);
    TiffDirectory directory = (TiffDirectory) contents.directories.get(0);

    int width = directory.findField(TIFF_TAG_IMAGE_WIDTH).getIntValue();
View Full Code Here

  }

  public IImageMetadata getMetadata(ByteSource byteSource, Map params)
      throws ImageReadException, IOException
  {
    FormatCompliance formatCompliance = FormatCompliance.getDefault();
    TiffContents contents = new TiffReader(isStrict(params)).readContents(
        byteSource, params, formatCompliance);

    ArrayList directories = contents.directories;
View Full Code Here

TOP

Related Classes of org.apache.sanselan.FormatCompliance

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.