Comments (3)
In case this may be useful to someone having the same issue: as a workaround, I am piping exiv2 -PVk
output through sed
to trim trailing whitespaces, result can be processed by exiv2 -m-
:
exiv2 -PVk \
-K Exif.Image.DateTime \
-K Exif.Image.Make \
-K Exif.Image.Model \
-K Exif.Photo.LensMake \
-K Exif.Photo.LensModel \
source.jpg \
| sed -e 's/[[:space:]]*$//' \
| exiv2 -m- target.jpg
from exiv2.
I was about to state, that it may not be a bug, but rather a feature. But found this on the manual:
In the file, any blank lines or additional white space is ignored and any lines beginning with a # are comments.
Also, from the same manual:
value The remaining text on the line is the value, and can optionally be enclosed in quotes (see Quotations with 'modify' commands). For Ascii, XmpAlt, XmpBag, XmpSeq and XmpText, the value is optional which is equivalent to an empty value ("")
So, it's seams like expected behavior is not to differentiate between the following of examples You've provided:
exiv2 -M "set Exif.Photo.LensMake Ascii " image.jpg
exiv2 -M "set Exif.Photo.LensMake Ascii" image.jpg
Relevant (I guess) parts of the source:
- https://github.com/Exiv2/exiv2/blob/main/app/exiv2.cpp#L1234-L1257 (reading the lines)
- https://github.com/Exiv2/exiv2/blob/main/app/exiv2.cpp#L1302-L1426 (parsing the line)
- https://github.com/Exiv2/exiv2/blob/main/app/exiv2.cpp#L1363-L1405 (parsing the value, I guess the culprit is here)
from exiv2.
Thanks for confirming my assumptions.
Whatever the parsing rules are, I think it is a fair expectation that exiv2 -m
should be able to consume what exiv2 -Pvk
produces.
from exiv2.
Related Issues (20)
- Support winget installation HOT 3
- Canon Lens incorrectly identified as Sigma Lens HOT 11
- Canon EF 100mm f/2.8L Macro IS USM not accurately detected HOT 1
- RawTherapee ART and Darktable cannot recognise correctly Tamron and Tokina lenses on Nikon camera HOT 7
- exiv2 does not register certain namespaces present in an image HOT 1
- Improve i18n test coverage
- Timeout in OSS-Fuzz
- exiv2.org website redirects to DNS page HOT 2
- Orientation: CLI tool and C++ API disagree HOT 2
- CMake build fails if samples enabled but webready disabled, due to conntest sample dependency HOT 6
- Access Violation in value.cpp HOT 3
- cmake出错了 HOT 5
- Who can make changes in Wiki?
- Nikon Z8, Nikon F and 3rd-party lenses not being identified in Darktable HOT 3
- Adding EXIF metadata causes some JPEGs to become invalid HOT 3
- How to get multiple XMP blocks?
- Release version 0.28.3 HOT 10
- Missing options in meson build
- Error parsing -M option arguments: Invalid key Xmp.GCamera.MotionPhoto HOT 21
- CMake Error for exiv2 >= v0.28.0 for -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exiv2.