From bfee7abfc5bc8f0d91266d1a67b93b07aace2b9c Mon Sep 17 00:00:00 2001 From: clanmills Date: Sun, 1 Nov 2020 11:58:40 +0000 Subject: [PATCH 1/3] Disable exiv2 option --binary --- src/actions.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/actions.cpp b/src/actions.cpp index a941d677..ca0b2099 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -606,14 +606,9 @@ namespace Action { return result ; } - static void binaryOutput(bool suppressLong,const std::ostringstream& os) + static void binaryOutput(const std::ostringstream& os) { - const int dots = 100; - if ( suppressLong && os.str().length() > dots ) { - std::cout << os.str().substr(0,dots) << " ..." ; - } else { - std::cout << os.str(); - } + std::cout << os.str(); } bool Print::printMetadatum(const Exiv2::Metadatum& md, const Exiv2::Image* pImage) @@ -709,7 +704,7 @@ namespace Action { } else { os << std::dec << md.value(); } - binaryOutput(Params::instance().binary_,os); + binaryOutput(os); } if (Params::instance().printItems_ & Params::prTrans) { if (!first) @@ -717,7 +712,7 @@ namespace Action { first = false; std::ostringstream os; os << std::dec << md.print(&pImage->exifData()); - binaryOutput(Params::instance().binary_,os) ; + binaryOutput(os) ; } if (Params::instance().printItems_ & Params::prHex) { if (!first) From 6982c0148e90d840d5ca864b99e6c45e29f64dca Mon Sep 17 00:00:00 2001 From: clanmills Date: Thu, 5 Nov 2020 10:11:10 +0000 Subject: [PATCH 2/3] Adding python test --- test/data/pr_1384.exv | Bin 0 -> 2449 bytes tests/bugfixes/github/test_pr_1384.py | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/data/pr_1384.exv create mode 100644 tests/bugfixes/github/test_pr_1384.py diff --git a/test/data/pr_1384.exv b/test/data/pr_1384.exv new file mode 100644 index 0000000000000000000000000000000000000000..4d4a1bb46155bc0981abbb7f581aea94b2f10aca GIT binary patch literal 2449 zcma);YfKzf6vxlZLU-9vmiMD#ofZ@#@46a1upsG+Sf{ZLJVgd$4U|CxKyX+ly4F6Vd7 zJ#*&V*SRE>T}L8^%;eRy<0WxV4H!z3C;!2gC7BBfL(YYOHH-Dn-9)b z9fWRtTcI2<$7VejKI)?FFBPoqdmk$7P%$Fh4Hqr@5gi+^p4wTb>EG?A+53ZYE)A z*8;S&E4IH|t8ac%tBXYsb@#`+`!&Po)wS}rNVF?`&>2aIZO^R6d|4#fJroxHPbBz9VB zyffO>*^f`RBhp40tuFTR(f-Jby>X5AnkHS34#d0r2DWMq(F0zhoE$Opx8#bS!{OoC zye3yFQY`dukRsccGo5 zIm9Q2DCJXq;q%_fi3hG9p1vOV@-~lYo1t$rtM{y&9}K<}@vPh+-KlT>l4$enSo$IN z%q69_=5qS^V}bSV9bcr3UQxe$q2|@P)Jyw5OyBYCd+$Cq6YQxOEFhXhL2?znaqPFH zzR`CkTr~b;SzZNw@Vcm+pCI%Z$&=vCCq*UX^(&J+3`LjB6~shI=6<%*u+yrjy6H0< z!=h?kM4S}K--9#3PPop3vn1aDXG^{XRz^fsUj(ZoA~(J+Ql#Alc8-YLxEi`711ZhM zZuxE|{7;XlRwWEp5slb5Bzwx6SrFs?1P<)`?Fv_I3L^r z4uByj&VTUmI0i9D{x5^i^M5rwpczI8zkc7UwhCPj>Da>+x_OtJer(99D@(IQmPAM^ zkCi$x)Y0gmL829@@|~n8>RRiHbtCb;)D&*v3qbGd(|RfmZ%}JRp1R++-3;I!`T1Xu C`dv!^ literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_pr_1384.py b/tests/bugfixes/github/test_pr_1384.py new file mode 100644 index 00000000..acba7c13 --- /dev/null +++ b/tests/bugfixes/github/test_pr_1384.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +import system_tests + +class test_pr_1384(metaclass=system_tests.CaseMeta): + url = "https://github.com/Exiv2/exiv2/pull/1384" + + filename = "$data_path/pr_1384.exv" + commands = ["$exiv2 --grep ColorMatrix/i $filename"] + stderr = [""] + stdout = ["""Exif.Image.ColorMatrix1 SRational 9 10236/10000 -4532/10000 397/10000 -3403/10000 10623/10000 3223/10000 -242/10000 968/10000 8530/10000 +Exif.Image.ColorMatrix2 SRational 9 8695/10000 -2558/10000 -648/10000 -5015/10000 12711/10000 2575/10000 -1279/10000 2215/10000 7514/10000 +""" +] + retval = [0] From 6ec81f9baca31427b3de6db539cd7f5b53e47dbe Mon Sep 17 00:00:00 2001 From: clanmills Date: Thu, 5 Nov 2020 10:11:30 +0000 Subject: [PATCH 3/3] Updating man page. --- man/man1/exiv2.1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/man/man1/exiv2.1 b/man/man1/exiv2.1 index f9a2c743..08cee4f9 100644 --- a/man/man1/exiv2.1 +++ b/man/man1/exiv2.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH EXIV2 1 "May 12, 2020" +.TH EXIV2 1 "Nov 6, 2020" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -132,7 +132,7 @@ exiv2 [ opt [arg] ]+ [ act ] file ... .sp 1 option [arg] long option description -a tim --adjust Modify time stamps. [+|-]HH[:MM[:SS[.mmm]]] --b --binary Show large binary values (default is to restrict them). +-b --binary This option is obsolete and does nothing. -c txt --comment JPEG comment string to set in the image ('modify' action). ... -d tgt --delete Delete target(s) for the 'delete' action. ... -D +-n --days Time adjustment by a positive or negative number of days ... @@ -210,9 +210,6 @@ Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror) or 'm'(ute). The default log-level is 'w'. \fB\-Qm\fP is equivalent to \fB\-q\fP. All log messages are written to standard error. .TP -.B \-b -The output from large binary values is to restricted by default. When outputting the value of a large value such as MakerNote, the default behaviour is to restrict the data and end with "...". The option --binary enables you to see all the data. -.TP .B \-u Show unknown tags (default is to suppress tags which don't have a name). .TP @@ -622,7 +619,7 @@ The tag is a triplet of Family.Group.Tagname. The following groups are defined GPSInfo Canon Fujifilm NikonLd1 OlympusFe1 Pentax Image CanonCf NikonLd2 OlympusFe2 PentaxDng Image2 CanonCs Nikon1 NikonLd3 OlympusFe3 -Image3 CanonF1 Nikon2 NikonMe OlympusFe4 Samsung2 +Image3 CanonFi Nikon2 NikonMe OlympusFe4 Samsung2 Iop CanonPa Nikon3 NikonPc OlympusFe5 SamsungPictureWizard MakerNote CanonPi NikonAFT NikonPreview OlympusFe6 SamsungPreview MpfInfo CanonPr NikonAf NikonSi01xx OlympusFe7