-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exiv2 -m file
/ exiv2 -M
cannot handle whitespaces value
#2836
Comments
In case this may be useful to someone having the same issue: as a workaround, I am piping 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 |
I was about to state, that it may not be a bug, but rather a feature. But found this on the manual:
Also, from the same manual:
So, it's seams like expected behavior is not to differentiate between the following of examples You've provided:
Relevant (I guess) parts of the source:
|
Thanks for confirming my assumptions. Whatever the parsing rules are, I think it is a fair expectation that |
Describe the bug
exiv2 -m file
fails when value is filled with whitespaces.To Reproduce
Create commands file
metadata.txt
with following content:(note the whitespaces in
Exif.Photo.LensMake
line)Try to apply this metadata to an image:
Error:
Expected behavior
Specified value is applied as is, or an empty string is applied.
Desktop (please complete the following information):
Additional context
Can also be reproduced with
exiv2 -M "set Exif.Photo.LensMake Ascii " image.jpg
(note the space before closing"
,exiv2 -M "set Exif.Photo.LensMake Ascii" image.jpg
orexiv2 -M "set Exif.Photo.LensMake Ascii ''" image.jpg
work fine).Looks like a regression, I believe previous version was able to process same command, or maybe previous version trimmed
-PVk -K
output - I have a script I use to selectively copy Exif metadata, and noticed that it started to fail with some files I was able to process before.The text was updated successfully, but these errors were encountered: