Commit e44d0ffa authored by Jim Nelson's avatar Jim Nelson

#1183: Now display ISO, exposure, and/or aperture when available, even if not all are available.

parent ae4e1fac
......@@ -433,9 +433,6 @@ public class PhotoExif {
}
if (marker != Jpeg.Marker.APP1 || segment_length < Exif.SIGNATURE.length) {
debug("Skipping segment %X length %d in %s", marker.get_byte(), segment_length,
file.get_path());
if (segment_length > 0)
fins.skip(segment_length, null);
......
......@@ -271,11 +271,43 @@ private class BasicProperties : Properties {
}
}
if (exposure != "" && aperture != "" && iso != "") {
add_line(_("Exposure:"), exposure + ", " + aperture);
add_line("","ISO " + iso);
if (exposure != "" || aperture != "" || iso != "") {
string line = null;
// attempt to put exposure and aperture on the same line
if (exposure != "")
line = exposure;
if (aperture != "") {
if (line != null)
line += ", " + aperture;
else
line = aperture;
}
// if not both available but ISO is, add it to the first line
if ((exposure == "" || aperture == "") && iso != "") {
if (line != null)
line += ", " + "ISO " + iso;
else
line = "ISO " + iso;
add_line(_("Exposure:"), line);
} else {
// fit both on the top line, emit and move on
if (line != null)
add_line(_("Exposure:"), line);
// emit ISO on a second unadorned line
if (iso != "") {
if (line != null)
add_line("","ISO " + iso);
else
add_line(_("Exposure:"), "ISO " + iso);
}
}
}
set_text();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment