add ExposureBiasValue to the statusbar

This commit is contained in:
Colin McMillen 2023-08-30 23:35:23 -04:00
parent 4f86338a3e
commit 75ad5bd478

View File

@ -104,6 +104,7 @@ public class Photo {
public string FNumber = "<unk>";
public string ExposureTime = "<unk>";
public string IsoSpeed = "<unk>";
public string ExposureBiasValue = "<unk>";
public int Rating = 0;
public ushort Orientation = 1;
public GpsInfo? Gps = null;
@ -370,6 +371,15 @@ public class Photo {
DateTimeOriginal = DateTimeOriginal.AddSeconds(fractionalSeconds);
}
IExifValue<SignedRational>? exposureBiasValue;
if (exifs.TryGetValue(ExifTag.ExposureBiasValue, out exposureBiasValue)) {
SignedRational r = exposureBiasValue.Value;
ExposureBiasValue = r.ToString();
if (r.Numerator >= 0) {
ExposureBiasValue = "+" + ExposureBiasValue;
}
}
Gps = GpsInfo.ParseExif(exifs);
}
@ -416,7 +426,7 @@ public class Photo {
public string Description() {
string date = DateTimeOriginal.ToString("yyyy-MM-dd HH:mm:ss.ff");
return String.Format(
"{0,6} {1,-5} {2,-7} {3,-10} {7,4}x{8,-4} {4} {5,-20} {6}",
FocalLength, FNumber, ExposureTime, IsoSpeed, date, ShortLensModel, Filename, Size.X, Size.Y);
"{0,6} {1,-5} {2,-7} {3,-10} {9,-4} {7,4}x{8,-4} {4} {5,-20} {6}",
FocalLength, FNumber, ExposureTime, IsoSpeed, date, ShortLensModel, Filename, Size.X, Size.Y, ExposureBiasValue);
}
}