codecV = "jpg";
IImageMetadata meta = Sanselan.getMetadata(file);
if (meta != null && meta instanceof JpegImageMetadata) {
JpegImageMetadata jpegmeta = (JpegImageMetadata) meta;
TiffField tf = jpegmeta.findEXIFValue(TiffConstants.EXIF_TAG_MODEL);
if (tf != null) {
model = tf.getStringValue().trim();
}
tf = jpegmeta.findEXIFValue(TiffConstants.EXIF_TAG_EXPOSURE_TIME);
if (tf != null) {
exposure = (int) (1000 * tf.getDoubleValue());
}
tf = jpegmeta.findEXIFValue(TiffConstants.EXIF_TAG_ORIENTATION);
if (tf != null) {
orientation = tf.getIntValue();
}
tf = jpegmeta.findEXIFValue(TiffConstants.EXIF_TAG_ISO);
if (tf != null) {
// Galaxy Nexus jpg pictures may contain multiple values, take the first
int[] isoValues = tf.getIntArrayValue();
iso = isoValues[0];
}
}
} else if (formatName.startsWith("PNG")) {
codecV = "png";