Package gov.nara.nwts.ftappImg.tif

Examples of gov.nara.nwts.ftappImg.tif.TifExtractor


    jpegext.close();
    return null;
  }
  public Object doTiff(File f) {
    String filekey = getKey(f);
    TifExtractor tiffext = new TifExtractor(f);
    ArrayList<Object> list = tiffext.getTags();
    for(Object obj: list){
      if (obj instanceof TIFFField) {
        addObject(doTifObject(filekey, tiffext, (TIFFField)obj));
      } else if (obj instanceof XMPPropertyInfo) {
        addObject(doXMPObject(filekey, tiffext.xmpex, (XMPPropertyInfo)obj));
      }
    }
    dt.types.remove(filekey);
    tiffext.close();
    return null;
  }
View Full Code Here


    vals.add("");
    vals.add("");
  }
 
  public Object compute(File f, FileTest fileTest) {
    TifExtractor tiffext = new TifExtractor(f);
    vals.set(0,tiffext.getTiffInt(TAGS.TIFF_BITS_PER_CHANNEL));
    vals.set(1,tiffext.getTiffInt(TAGS.TIFF_COLOR_SPACE));
    vals.set(2,tiffext.getXMP(XMPExtractor.XMP_ICC));
    String tfs = tiffext.getTiffString(TAGS.TIFF_DESCRIPTION);
    vals.set(3,tfs);
    vals.set(4, tiffext.getXMP(XMPExtractor.XMP_KEY));
    vals.set(5, tiffext.getXMP(XMPExtractor.XMP_INSTR));

    String[] parts = tfs.split("(\\s\\s\\s+|\n)");
    for(int i=0; (i < parts.length) && (i <4); i++){
      vals.set(6+i,parts[i]);
    }
    tiffext.close();
    return fileTest.fileTest(f);
  }
View Full Code Here

TOP

Related Classes of gov.nara.nwts.ftappImg.tif.TifExtractor

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.