From 3d1df2862eed29c530e3e797281cb2d3a052c20b Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Sun, 7 May 2017 09:57:42 +0300 Subject: [PATCH] gui: Add rotation option Signed-off-by: Yan Burman --- ChangeLog | 2 +- gui/converter.py | 8 ++++- gui/converter.wxg | 10 ++++++- gui/locale/en/LC_MESSAGES/converter.mo | Bin 391 -> 391 bytes gui/locale/en/LC_MESSAGES/converter.po | 34 ++++++++++++--------- gui/locale/he/LC_MESSAGES/converter.mo | Bin 1608 -> 1865 bytes gui/locale/he/LC_MESSAGES/converter.po | 36 ++++++++++++++--------- gui/locale/messages.pot | 32 ++++++++++++-------- gui/locale/ru/LC_MESSAGES/converter.mo | Bin 1950 -> 2229 bytes gui/locale/ru/LC_MESSAGES/converter.po | 39 +++++++++++++++---------- src/sjcam_raw2dng.cpp | 2 +- 11 files changed, 104 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6120bf..2d87c48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ v1.2.0 -* Added support for stills taken in rotated orientation +* Added support for stills taken in rotated orientation (in GUI as well) * Add full support for crop FOV in M20 and SJ5000x * Add support for non-zero stride * Some slight performance optimizations diff --git a/gui/converter.py b/gui/converter.py index d1793a4..f76f6c8 100755 --- a/gui/converter.py +++ b/gui/converter.py @@ -127,6 +127,7 @@ def __init__(self, *args, **kwds): self.tiff_checkbox = wx.CheckBox(self, wx.ID_ANY, _("TIFF")) self.dng_checkbox = wx.CheckBox(self, wx.ID_ANY, _("DNG")) self.thumb_checkbox = wx.CheckBox(self, wx.ID_ANY, _("Thumbnail")) + self.rotate_checkbox = wx.CheckBox(self, wx.ID_ANY, _("Rotation")) self.convert_button = wx.Button(self, wx.ID_ANY, _("Convert")) self.status_text_ctrl = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY) self.abort_button = wx.Button(self, wx.ID_ANY, _("Abort")) @@ -156,13 +157,14 @@ def __set_properties(self): self.dng_checkbox.SetToolTip(wx.ToolTip(_("Convert to DNG"))) self.dng_checkbox.SetValue(1) self.thumb_checkbox.SetToolTip(wx.ToolTip(_("Create thumbnail (needed by some editors e.g. darktable)"))) + self.rotate_checkbox.SetToolTip(wx.ToolTip(_("Check if images were taken with rotation enabled in camera"))) self.abort_button.Enable(False) # end wxGlade def __do_layout(self): # begin wxGlade: MainFrame.__do_layout grid_sizer_1 = wx.FlexGridSizer(5, 2, 0, 0) - grid_sizer_2 = wx.GridSizer(1, 3, 0, 0) + grid_sizer_2 = wx.GridSizer(1, 4, 0, 0) grid_sizer_1.Add((20, 20), 0, 0, 0) grid_sizer_1.Add(self.logo_bitmap, 0, wx.ALIGN_CENTER, 0) grid_sizer_1.Add(self.src_dir_text_ctrl, 0, wx.EXPAND, 0) @@ -172,6 +174,7 @@ def __do_layout(self): grid_sizer_2.Add(self.tiff_checkbox, 0, 0, 0) grid_sizer_2.Add(self.dng_checkbox, 0, 0, 0) grid_sizer_2.Add(self.thumb_checkbox, 0, 0, 0) + grid_sizer_2.Add(self.rotate_checkbox, 0, 0, 0) grid_sizer_1.Add(grid_sizer_2, 1, 0, 0) grid_sizer_1.Add(self.convert_button, 0, wx.ALL | wx.EXPAND, 2) grid_sizer_1.Add(self.status_text_ctrl, 0, wx.EXPAND, 0) @@ -218,6 +221,9 @@ def OnConvert(self, event): # wxGlade: MainFrame. if self.thumb_checkbox.IsChecked(): args.append('-m') + if self.rotate_checkbox.IsChecked(): + args.append('-r') + if not self.dest_dir_text_ctrl.IsEmpty(): args.append('-o') args.append(self.dest_dir_text_ctrl.GetValue()) diff --git a/gui/converter.wxg b/gui/converter.wxg index 5faba84..dda515a 100644 --- a/gui/converter.wxg +++ b/gui/converter.wxg @@ -99,7 +99,7 @@ 0 1 - 3 + 4 0 0 @@ -126,6 +126,14 @@ Create thumbnail (needed by some editors e.g. darktable) + + 0 + + + + Check if images were taken with rotation enabled in camera + + diff --git a/gui/locale/en/LC_MESSAGES/converter.mo b/gui/locale/en/LC_MESSAGES/converter.mo index 45bcd799e6e0e9c1d1ba6402cca2cec22f0acf6d..3c26e29e4d0026bb7b459696c96384a84697f2d3 100644 GIT binary patch delta 34 hcmZo?ZfBlQ$7QN(V6I?jU}a=Fu|p2QGn=^KIslh%30(jH delta 34 fcmZo?ZfBlQ$7P~xXslppZe?gWu|p1-x8XVfm*WX& diff --git a/gui/locale/en/LC_MESSAGES/converter.po b/gui/locale/en/LC_MESSAGES/converter.po index 3f76436..f7fc659 100644 --- a/gui/locale/en/LC_MESSAGES/converter.po +++ b/gui/locale/en/LC_MESSAGES/converter.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-13 17:19+0300\n" -"PO-Revision-Date: 2017-04-13 17:19+0300\n" +"POT-Creation-Date: 2017-05-07 10:25+0300\n" +"PO-Revision-Date: 2017-05-07 10:26+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: en\n" @@ -30,7 +30,7 @@ msgstr "" msgid "&Help" msgstr "" -#: converter.py:132 +#: converter.py:133 msgid "Abort" msgstr "" @@ -38,27 +38,31 @@ msgstr "" msgid "About" msgstr "" -#: converter.py:194 +#: converter.py:160 +msgid "Check if images were taken with rotation enabled in camera" +msgstr "" + +#: converter.py:197 msgid "Choose destination folder" msgstr "" -#: converter.py:187 +#: converter.py:190 msgid "Choose source folder" msgstr "" -#: converter.py:130 +#: converter.py:131 msgid "Convert" msgstr "" -#: converter.py:156 +#: converter.py:157 msgid "Convert to DNG" msgstr "" -#: converter.py:155 +#: converter.py:156 msgid "Convert to TIFF" msgstr "" -#: converter.py:158 +#: converter.py:159 msgid "Create thumbnail (needed by some editors e.g. darktable)" msgstr "" @@ -74,7 +78,7 @@ msgstr "" msgid "E&xit\tCtrl-Q" msgstr "" -#: converter.py:204 converter.py:226 +#: converter.py:207 converter.py:232 msgid "Error!" msgstr "" @@ -82,15 +86,19 @@ msgstr "" msgid "Exit" msgstr "" -#: converter.py:204 +#: converter.py:207 msgid "Must select at least one output format (DNG/TIFF)" msgstr "" -#: converter.py:226 +#: converter.py:232 msgid "Must select source folder" msgstr "" -#: converter.py:152 +#: converter.py:130 +msgid "Rotation" +msgstr "" + +#: converter.py:153 msgid "SJCAM RAW Converter" msgstr "" diff --git a/gui/locale/he/LC_MESSAGES/converter.mo b/gui/locale/he/LC_MESSAGES/converter.mo index 6e8a766dca450771cc43766055fb63c785cd3911..881ce181239f4ffe2348f36d4c8a4de07dea532f 100644 GIT binary patch delta 795 zcmYMy&ubGw6u|LWH%&J+tu_9RQs$C_htfnSiBbFkQmCLv_1eR>u6Aj&EiqCLLXRHw zVBJIw#v-B;d-0H-3RUo=$DBsc3Lf+i5IpPmts5Pf{mk2$%)B?759yCXD_=8-hN2y$ zAEAGt=jbhq2Q9xtsU#M#4@Yh0w-O{d`K=GZn$NRp6GAZ+sc)^*?H|>(|*Oh?%mMKUe(hzcis#1vR|9i)y0}y z^A`i{1@6p(cUAj=o^>l;)$RPY9Lt%C=fk93OkJ6~S(yo3e<3_+PYjHY=8L+JFCQz0 z_w14X;qlIfowmwN^IDshSv8ML!?d-zZ=Pz?X8hQ^GEGz0rcUs}JZBNXs#)WGi)X#_ fHgVBP{aYG3$un8A&P>BRlcj6X@FBl!n|1XE&;O0x delta 542 zcmYk&u`dKc6vy$|+ub|v*5XjOI~UCrBo~&86``b}AyNASB>sdelp=}^5-QhuHL?|R08WM>@e1DTom}KrV@3QmWn|Bx92JOePw{KWO>>B%qJ;L5}_+dR^9-q<2 z*Ub0K&&+Qe)`grggHXW&PGE>J_Tm!G;yRX%X`4L`0e^H*h0f8#ON{UemG}(@u;3cg zgH=>KhAR|bz!LEem%H&W^8~wyPqBy>Six(oQQzEiP~k6B;vZDU0nc5-Dyq;H(y`e_ z6*@pA>|l&%*uWRmcO{Z)s&&-;7Sg9}4s6YEg9G*K1bCorK;u)#S{fPoY(m8vsTPm5 z#rsjssL=n_N1&o6Y33T~Zq9d-V|ONba2JcMW;8t-#dA}W$+%bl3*&Uv3!L=GUv`p@ G{QNJfz%VNS diff --git a/gui/locale/he/LC_MESSAGES/converter.po b/gui/locale/he/LC_MESSAGES/converter.po index 41d28af..ea629bb 100644 --- a/gui/locale/he/LC_MESSAGES/converter.po +++ b/gui/locale/he/LC_MESSAGES/converter.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-13 17:20+0300\n" -"PO-Revision-Date: 2017-04-13 17:27+0300\n" +"POT-Creation-Date: 2017-05-07 10:27+0300\n" +"PO-Revision-Date: 2017-05-07 10:29+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: he\n" @@ -30,7 +30,7 @@ msgstr "&קובץ" msgid "&Help" msgstr "&עזרא" -#: converter.py:132 +#: converter.py:133 msgid "Abort" msgstr "הפסק" @@ -38,27 +38,31 @@ msgstr "הפסק" msgid "About" msgstr "אודות" -#: converter.py:194 +#: converter.py:160 +msgid "Check if images were taken with rotation enabled in camera" +msgstr "יש לבחור אם רוטציה הופעלה במצלמה" + +#: converter.py:197 msgid "Choose destination folder" msgstr "בחר תיקיית יעד" -#: converter.py:187 +#: converter.py:190 msgid "Choose source folder" msgstr "בחר תיקיית מקור" -#: converter.py:130 +#: converter.py:131 msgid "Convert" msgstr "המר" -#: converter.py:156 +#: converter.py:157 msgid "Convert to DNG" msgstr "המר ל-DNG" -#: converter.py:155 +#: converter.py:156 msgid "Convert to TIFF" msgstr "המר ל-TIFF" -#: converter.py:158 +#: converter.py:159 msgid "Create thumbnail (needed by some editors e.g. darktable)" msgstr "ייצר thumbnail (דרוש ע\"י תוכנות מסוימות כגון darktable )" @@ -74,7 +78,7 @@ msgstr "תיקיית יעד" msgid "E&xit\tCtrl-Q" msgstr "&יציאה\tCTRL-Q" -#: converter.py:204 converter.py:226 +#: converter.py:207 converter.py:232 msgid "Error!" msgstr "שגיאה!" @@ -82,15 +86,19 @@ msgstr "שגיאה!" msgid "Exit" msgstr "יציאה" -#: converter.py:204 +#: converter.py:207 msgid "Must select at least one output format (DNG/TIFF)" msgstr "יש לבחור לפחות פורמט אחד (DNG/TIFF)" -#: converter.py:226 +#: converter.py:232 msgid "Must select source folder" msgstr "תיקיית מקור לא נבחרה" -#: converter.py:152 +#: converter.py:130 +msgid "Rotation" +msgstr "רוטציה" + +#: converter.py:153 msgid "SJCAM RAW Converter" msgstr "ממיר SJCAM RAW" @@ -108,7 +116,7 @@ msgstr "" #: converter.py:129 msgid "Thumbnail" -msgstr "" +msgstr "תמונה ממוזערת" #~ msgid "Convert to TIFF as well as DNG" #~ msgstr "המר ל-TIFF בנוסף ל-DNG" diff --git a/gui/locale/messages.pot b/gui/locale/messages.pot index ce9571c..04e2692 100644 --- a/gui/locale/messages.pot +++ b/gui/locale/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-13 17:17+0300\n" +"POT-Creation-Date: 2017-05-07 10:24+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +29,7 @@ msgstr "" msgid "&Help" msgstr "" -#: converter.py:132 +#: converter.py:133 msgid "Abort" msgstr "" @@ -37,27 +37,31 @@ msgstr "" msgid "About" msgstr "" -#: converter.py:194 +#: converter.py:160 +msgid "Check if images were taken with rotation enabled in camera" +msgstr "" + +#: converter.py:197 msgid "Choose destination folder" msgstr "" -#: converter.py:187 +#: converter.py:190 msgid "Choose source folder" msgstr "" -#: converter.py:130 +#: converter.py:131 msgid "Convert" msgstr "" -#: converter.py:156 +#: converter.py:157 msgid "Convert to DNG" msgstr "" -#: converter.py:155 +#: converter.py:156 msgid "Convert to TIFF" msgstr "" -#: converter.py:158 +#: converter.py:159 msgid "Create thumbnail (needed by some editors e.g. darktable)" msgstr "" @@ -73,7 +77,7 @@ msgstr "" msgid "E&xit\tCtrl-Q" msgstr "" -#: converter.py:204 converter.py:226 +#: converter.py:207 converter.py:232 msgid "Error!" msgstr "" @@ -81,15 +85,19 @@ msgstr "" msgid "Exit" msgstr "" -#: converter.py:204 +#: converter.py:207 msgid "Must select at least one output format (DNG/TIFF)" msgstr "" -#: converter.py:226 +#: converter.py:232 msgid "Must select source folder" msgstr "" -#: converter.py:152 +#: converter.py:130 +msgid "Rotation" +msgstr "" + +#: converter.py:153 msgid "SJCAM RAW Converter" msgstr "" diff --git a/gui/locale/ru/LC_MESSAGES/converter.mo b/gui/locale/ru/LC_MESSAGES/converter.mo index d0ee32be2ba44dbab152fdc8766e2b22c59fd71d..394a6cb16d26d2ad140d7ef7759a422beda47556 100644 GIT binary patch delta 802 zcmY+??@JUx7{Kva*B_^4muA`zv4QkWWZWg;b%Z2@FM>j%*TQ;jx#;b|d7<=1?Ok0I zxJgjri=fw8*OHm`qW8h<>q_V!slLy!7Ctchnc2CWd7hcu$i`hud)>`zia0^*r~RM} z(bgRvM6OAxR?K4y7E;GjuccncBJ-1Y66@H5Z?Fxw@d$p!EGAe`YDxW~)6I)hu2P3_ z7-hpEHsd(vaRO!GMaZ7IiEq>KF19mH@C8MD$6m(sWH0X@qx}9k_OQQtP3Jf- zKH?;P!wWb-7U%E=%E>I^SzNY`DwJvs8S2}u&{X+zeP%_ZbI@_n}Z z{~`Z_Lo~S~xsLrH7aN_?PiLs$mu7WvR|jS9o;oPXs=ZY6EM^D^= zf5VZH#s|0VjK#@{`D|is-Y3guGkIiUvun2G#k-`=%omxdGhmh(8EUglf5*hha^rkU eZ&P;l;HS~mwy8d|&MLCfX7Vt3YQNqwTk0=G8kVsD delta 542 zcmYk&IZFdU6u|MfM-HQAO*|mR3)I3u5?93p!9qblfQ6Mr!B()h*;+&d2eA-DENm<+ z7Hw>;?5zaR&cdS+3oHL`SkQsDznNwC9dlhc4Wg%_e*%@Vrw%BXJ(>zN#O zF{~|Kz;;3>`@gz4= Output dir (must exist)\n" "\t-t, --tiff Write TIFF image to \".tiff\" (false by default)\n" - "\t-d, --dng Write DNG image to \".dng\" (used by default if no output is supplied)\n", + "\t-d, --dng Write DNG image to \".dng\" (used by default if no output is supplied)\n" "\t-r, --rotated Image was taken in rotated orientation (false by default)\n", prog, conf.m_iThreads);