Package com.drew.metadata

Examples of com.drew.metadata.Directory.containsTag()


        try {
          imgmeta.setFilmspeed(exif.getInt(ExifDirectory.TAG_ISO_EQUIVALENT));
        } catch (MetadataException e) {
        }
      }
      if (exif.containsTag(ExifDirectory.TAG_FNUMBER)) {
        try {
          imgmeta.setFNumber(exif.getFloat(ExifDirectory.TAG_FNUMBER));
        } catch (MetadataException e) {
        }
      }
View Full Code Here


        try {
          imgmeta.setFNumber(exif.getFloat(ExifDirectory.TAG_FNUMBER));
        } catch (MetadataException e) {
        }
      }
      if (exif.containsTag(ExifDirectory.TAG_FOCAL_LENGTH)) {
        try {
          imgmeta.setFocalWidth(exif.getInt(ExifDirectory.TAG_FOCAL_LENGTH));
        } catch (MetadataException e) {
        }
      }
View Full Code Here

        try {
          imgmeta.setFocalWidth(exif.getInt(ExifDirectory.TAG_FOCAL_LENGTH));
        } catch (MetadataException e) {
        }
      }
      if (exif.containsTag(ExifDirectory.TAG_EXPOSURE_TIME)) {
        try {
          imgmeta.setExposureTime(exif.getFloat(ExifDirectory.TAG_EXPOSURE_TIME));
        } catch (MetadataException e) {
        }
      }
View Full Code Here

        try {
          imgmeta.setExposureTime(exif.getFloat(ExifDirectory.TAG_EXPOSURE_TIME));
        } catch (MetadataException e) {
        }
      }
      if (StringUtils.isBlank(imgmeta.getCopyright()) && exif.containsTag(ExifDirectory.TAG_COPYRIGHT))
        imgmeta.setCopyright(exif.getString(ExifDirectory.TAG_COPYRIGHT));

      // Extract GPS information
      try {
        Directory gps = meta.getDirectory(GpsDirectory.class);
View Full Code Here

        imgmeta.setCopyright(exif.getString(ExifDirectory.TAG_COPYRIGHT));

      // Extract GPS information
      try {
        Directory gps = meta.getDirectory(GpsDirectory.class);
        if (gps.containsTag(GpsDirectory.TAG_GPS_LATITUDE)) {
          Rational[] lat = gps.getRationalArray(GpsDirectory.TAG_GPS_LATITUDE);
          String latRef = gps.getString(GpsDirectory.TAG_GPS_LATITUDE_REF);
          double latitude = parseHMS(lat);
          if (latitude != 0) {
            if (StringUtils.isNotBlank(latRef) && "S".equalsIgnoreCase(latRef) && latitude > 0)
View Full Code Here

            if (StringUtils.isNotBlank(latRef) && "S".equalsIgnoreCase(latRef) && latitude > 0)
              latitude *= -1;
          }
          imgmeta.setGpsLat(latitude);
        }
        if (gps.containsTag(GpsDirectory.TAG_GPS_LONGITUDE)) {
          Rational[] lng = gps.getRationalArray(GpsDirectory.TAG_GPS_LONGITUDE);
          String lngRef = gps.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF);
          double longitude = parseHMS(lng);
          if (longitude != 0) {
            if (StringUtils.isNotBlank(lngRef) && "W".equalsIgnoreCase(lngRef) && longitude > 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.