#1199 Fixing webp-test.sh. Use -iXX to inject XMP into file without XMP->Exif/IPTC conversion

v0.27.3
Robin Mills 9 years ago
parent 4ab9c840e4
commit fa24a8a614

@ -1250,24 +1250,20 @@ namespace Action {
if (Params::instance().target_ & Params::ctThumb) { if (Params::instance().target_ & Params::ctThumb) {
rc = insertThumbnail(path); rc = insertThumbnail(path);
} }
if ( rc == 0 if ( rc == 0 && !(Params::instance().target_ & Params::ctXmpRaw)
&& ( Params::instance().target_ & Params::ctExif && ( Params::instance().target_ & Params::ctExif
|| Params::instance().target_ & Params::ctIptc || Params::instance().target_ & Params::ctIptc
|| Params::instance().target_ & Params::ctComment || Params::instance().target_ & Params::ctComment
|| Params::instance().target_ & Params::ctXmp || Params::instance().target_ & Params::ctXmp
|| Params::instance().target_ & Params::ctXmpRaw)) { )
) {
std::string suffix = Params::instance().suffix_; std::string suffix = Params::instance().suffix_;
if (suffix.empty()) suffix = ".exv"; if (suffix.empty()) suffix = ".exv";
if ((Params::instance().target_ & Params::ctXmpSidecar) if (Params::instance().target_ & Params::ctXmpSidecar) suffix = ".xmp";
|| (Params::instance().target_ & Params::ctXmpRaw )) suffix = ".xmp";
std::string exvPath = newFilePath(path, suffix); std::string exvPath = newFilePath(path, suffix);
std::string xmpPath = newFilePath(path, suffix); rc = metacopy(exvPath, path, Exiv2::ImageType::none, true);
rc = suffix == ".exv" ? metacopy(exvPath, path, Exiv2::ImageType::xmp, true)
: insertXmpPacket(xmpPath,path)
;
} }
if (0 == rc && Params::instance().target_ & Params::ctXmpSidecar) { if (0 == rc && (Params::instance().target_ & (Params::ctXmpSidecar|Params::ctXmpRaw)) ) {
std::string xmpPath = newFilePath(path,".xmp"); std::string xmpPath = newFilePath(path,".xmp");
rc = insertXmpPacket(xmpPath,path); rc = insertXmpPacket(xmpPath,path);
} }

@ -3,7 +3,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH EXIV2 1 "Aug 17, 2016" .TH EXIV2 1 "Aug 22, 2016"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -46,7 +46,7 @@ CR2 Read/Write Read/Write Read/Write -
CRW Read/Write - - Read/Write CRW Read/Write - - Read/Write
MRW Read Read Read - MRW Read Read Read -
TIFF Read/Write Read/Write Read/Write - TIFF Read/Write Read/Write Read/Write -
WEBP Read/Write Read/Write Read/Write - WEBP Read/Write - - Read/Write -
DNG Read/Write Read/Write Read/Write - DNG Read/Write Read/Write Read/Write -
NEF Read/Write Read/Write Read/Write - NEF Read/Write Read/Write Read/Write -
PEF Read/Write Read/Write Read/Write - PEF Read/Write Read/Write Read/Write -
@ -322,7 +322,7 @@ R : print image structure recursively (jpg, png, tiff, cr2 only)
.br .br
S : print image structure information (jpg, png, tiff, cr2 only) S : print image structure information (jpg, png, tiff, cr2 only)
.br .br
X : print "raw" XMP (jpg, png, tiff, cr2 only) X : print "raw" XMP (jpg, png, tiff, cr2, webp only)
.TP .TP
.B \-P \fIflgs\fP .B \-P \fIflgs\fP
Print flags for fine control of the tag list ('print' action). Allows Print flags for fine control of the tag list ('print' action). Allows
@ -386,6 +386,8 @@ file. Possible are Exif, IPTC and XMP and the default is all of
these. Note that the inserted XMP properties include those converted these. Note that the inserted XMP properties include those converted
to Exif and IPTC. to Exif and IPTC.
.sp 1 .sp 1
XX: Insert "raw" XMP metadata from a sidecar (see option -pX)
.sp 1
- : Read from stdin (not implemented yet). This is option is intended for "filter" operations such as: - : Read from stdin (not implemented yet). This is option is intended for "filter" operations such as:
.br .br
$ exiv2 -e{tgt}- \fIfilename\fP | xmllint .... | exiv2 -i{tgt}- \fIfilename\fP $ exiv2 -e{tgt}- \fIfilename\fP | xmllint .... | exiv2 -i{tgt}- \fIfilename\fP
@ -408,7 +410,7 @@ X : Extract metadata to an XMP sidecar file <file>.xmp. The remaining
extract targets determine what metadata to extract to the sidecar extract targets determine what metadata to extract to the sidecar
file. Possible are Exif, IPTC and XMP and the default is all of these. file. Possible are Exif, IPTC and XMP and the default is all of these.
.sp .sp
XX: Extract the "raw" XMP metadata to a sidecar (see option -pX) XX: Extract "raw" XMP metadata to a sidecar (see -pX)
.br .br
You may not use modify commands with the -eXX option and only XMP is written to the sidecar. You may not use modify commands with the -eXX option and only XMP is written to the sidecar.
.sp 1 .sp 1

@ -105,7 +105,8 @@ namespace Exiv2 {
void WebPImage::setIptcData(const IptcData& /*iptcData*/) void WebPImage::setIptcData(const IptcData& /*iptcData*/)
{ {
// not supported // not supported
throw(Error(32, "IPTC metadata", "WebP")); // just quietly ignore the request
// throw(Error(32, "IPTC metadata", "WebP"));
} }
void WebPImage::setComment(const std::string& /*comment*/) void WebPImage::setComment(const std::string& /*comment*/)

@ -42,7 +42,7 @@ source ./functions.source
copyTestFile $filename copyTestFile $filename
exiv2 -pS $filename exiv2 -pS $filename
exiv2 -iX $filename exiv2 -iXX $filename
exiv2 -pS $filename exiv2 -pS $filename
exiv2 -ix $filename exiv2 -ix $filename
@ -54,7 +54,7 @@ source ./functions.source
copyTestFile $filename copyTestFile $filename
exiv2 -pS $filename exiv2 -pS $filename
exiv2 -iX $filename exiv2 -iXX $filename
exiv2 -pS $filename exiv2 -pS $filename
exiv2 -ix $filename exiv2 -ix $filename
@ -68,7 +68,7 @@ source ./functions.source
exiv2 -pS $filename exiv2 -pS $filename
exiv2 -ix $filename exiv2 -ix $filename
exiv2 -pS $filename exiv2 -pS $filename
exiv2 -iX $filename exiv2 -iXX $filename
exiv2 -pS $filename exiv2 -pS $filename
printf "EXIF " >&3 printf "EXIF " >&3

Loading…
Cancel
Save