Skip to content

Commit

Permalink
Merge branch 'develop' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Apr 4, 2023
2 parents ebcd7d9 + 9d222c0 commit 2472828
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
namespace ImageGlass.Library.Image {
public struct ExifTagItem {
public string Group;
public string TagId;
public string Name;
public string Value;
}
Expand Down Expand Up @@ -176,7 +177,7 @@ public class ExifToolWrapper: List<ExifTagItem> {
var tpos2 = tmp.IndexOf('\t', tpos1 + 1);
var tpos3 = tmp.IndexOf('\t', tpos2 + 1);

if (tpos1 > 0 && tpos2 > 0) {
if (tpos1 > 0 && tpos2 > 0 && tpos3 > 0) {
var tagGroup = tmp.Substring(0, tpos1);
++tpos1;

Expand All @@ -198,6 +199,7 @@ public class ExifToolWrapper: List<ExifTagItem> {
if (tagName.Equals("File Name")) tagValue = originalFileName;

Add(new ExifTagItem() {
TagId = tagId,
Name = tagName,
Value = tagValue,
Group = tagGroup,
Expand Down
25 changes: 17 additions & 8 deletions Source/ImageGlass/FrmExifTool.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Source/ImageGlass/FrmExifTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public partial class FrmExifTool: Form {

private void btnCopyValue_Click(object sender, EventArgs e) {
if (lvExifItems.SelectedItems.Count > 0) {
Clipboard.SetText(lvExifItems.SelectedItems[0].SubItems[2].Text);
Clipboard.SetText(lvExifItems.SelectedItems[0].SubItems[3].Text);
}
}

Expand Down Expand Up @@ -234,6 +234,7 @@ public partial class FrmExifTool: Form {
li.Font = new Font(this.Font, FontStyle.Bold);
}

_ = li.SubItems.Add(item.TagId);
_ = li.SubItems.Add(item.Name);
_ = li.SubItems.Add(item.Value);
_ = lvExifItems.Items.Add(li);
Expand All @@ -254,7 +255,7 @@ public partial class FrmExifTool: Form {
fileSample = @"C:\fake dir\sample photo.jpg";
}

txtExifToolCommandPreview.Text = $"\"{toolPath}\" -fast -G -t -m -q {Configs.ExifToolCommandArgs} \"{fileSample}\"";
txtExifToolCommandPreview.Text = $"\"{toolPath}\" {ExifToolWrapper.DefaultCommands} {Configs.ExifToolCommandArgs} \"{fileSample}\"";
}


Expand Down
2 changes: 1 addition & 1 deletion Source/ImageGlass/frmSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ public partial class frmSetting: Form {
fileSample = @"C:\fake dir\sample photo.jpg";
}

txtExifToolCommandPreview.Text = $"\"{toolPath}\" -fast -G -t -m -q {txtExifToolCommandArgs.Text.Trim().Replace("\n", "")} \"{fileSample}\"";
txtExifToolCommandPreview.Text = $"\"{toolPath}\" {ExifToolWrapper.DefaultCommands} {txtExifToolCommandArgs.Text.Trim().Replace("\n", "")} \"{fileSample}\"";
}


Expand Down

0 comments on commit 2472828

Please sign in to comment.