#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) {
rc = insertThumbnail(path);
}
if ( rc == 0
if ( rc == 0 && !(Params::instance().target_ & Params::ctXmpRaw)
&& ( Params::instance().target_ & Params::ctExif
|| Params::instance().target_ & Params::ctIptc
|| Params::instance().target_ & Params::ctComment
|| Params::instance().target_ & Params::ctXmp
|| Params::instance().target_ & Params::ctXmpRaw)) {
)
) {
std::string suffix = Params::instance().suffix_;
if (suffix.empty()) suffix = ".exv";
if ((Params::instance().target_ & Params::ctXmpSidecar)
|| (Params::instance().target_ & Params::ctXmpRaw )) suffix = ".xmp";
if (Params::instance().target_ & Params::ctXmpSidecar) suffix = ".xmp";
std::string exvPath = newFilePath(path, suffix);
std::string xmpPath = newFilePath(path, suffix);
rc = suffix == ".exv" ? metacopy(exvPath, path, Exiv2::ImageType::xmp, true)
: insertXmpPacket(xmpPath,path)
;
rc = metacopy(exvPath, path, Exiv2::ImageType::none, true);
}
if (0 == rc && Params::instance().target_ & Params::ctXmpSidecar) {
if (0 == rc && (Params::instance().target_ & (Params::ctXmpSidecar|Params::ctXmpRaw)) ) {
std::string xmpPath = newFilePath(path,".xmp");
rc = insertXmpPacket(xmpPath,path);
}

@ -3,7 +3,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 "Aug 17, 2016"
.TH EXIV2 1 "Aug 22, 2016"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -46,7 +46,7 @@ CR2 Read/Write Read/Write Read/Write -
CRW Read/Write - - Read/Write
MRW Read Read Read -
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 -
NEF 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
S : print image structure information (jpg, png, tiff, cr2 only)
.br
X : print "raw" XMP (jpg, png, tiff, cr2 only)
X : print "raw" XMP (jpg, png, tiff, cr2, webp only)
.TP
.B \-P \fIflgs\fP
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
to Exif and IPTC.
.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:
.br
$ 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
file. Possible are Exif, IPTC and XMP and the default is all of these.
.sp
XX: Extract the "raw" XMP metadata to a sidecar (see option -pX)
XX: Extract "raw" XMP metadata to a sidecar (see -pX)
.br
You may not use modify commands with the -eXX option and only XMP is written to the sidecar.
.sp 1

@ -105,7 +105,8 @@ namespace Exiv2 {
void WebPImage::setIptcData(const IptcData& /*iptcData*/)
{
// 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*/)

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

Loading…
Cancel
Save