From 4f1adef8956eeba5c16188ed7b3c9d14221c6aec Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Tue, 25 Jul 2023 17:10:51 -0400 Subject: [PATCH] minor cleanups --- Program.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Program.cs b/Program.cs index 71b437f..d07aa11 100644 --- a/Program.cs +++ b/Program.cs @@ -176,9 +176,9 @@ public class Photo { // We don't assign to this.image until Load() is done, because we might // edit the image due to rotation (etc) and don't want to try generating // a texture for it until that's already happened. - Image tmpImage = await Image.LoadAsync(File); - Util.RotateImageFromExif(tmpImage, Orientation); - image = tmpImage; + Image tmp = await Image.LoadAsync(File); + Util.RotateImageFromExif(tmp, Orientation); + image = tmp; } private bool TryParseRating(XmpProfile? xmp, out int rating) { @@ -211,7 +211,6 @@ public class Photo { // FIXME: when we write out images, we'll want to correct the Exif Orientation to 1. // FIXME: handle date shot / edited (and sort by shot date?) - // FIXME: PixelXDimension & PixelYDimension hold the image geometry in Exif. IExifValue? orientation; if (exifs.TryGetValue(ExifTag.Orientation, out orientation)) { @@ -296,12 +295,8 @@ public class Photo { } public string Description() { - if (Loaded) { - string shootingInfo = $"{FocalLength}, {FNumber} at {ExposureTime}, {IsoSpeed}"; - return String.Format("{0,-40} {1,-50} {2}", shootingInfo, $"{CameraModel} {LensModel}", File); - } else { - return String.Format("{0,-90} {1}", "", File); - } + string shootingInfo = $"{FocalLength}, {FNumber} at {ExposureTime}, {IsoSpeed}"; + return String.Format("{0,-40} {1,-50} {2}", shootingInfo, $"{CameraModel} {LensModel}", File); } }