More graceful handling of EPS images in which non-existing XMP metadata is announced

v0.27.3
vog 14 years ago
parent da9eab3ede
commit 2b0ff37419

@ -633,11 +633,10 @@ namespace {
if (containsXmp) {
// search for XMP metadata
findXmp(xmpPos, xmpSize, data, posEps, posEndEps, write);
if (xmpSize == 0) {
if (xmpPos == posEndEps) {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Unable to find XMP metadata as announced at position: " << posContainsXmp << "\n";
#endif
throw Error(write ? 21 : 14);
}
// check embedding of XMP metadata
const size_t posLineAfterXmp = readLine(line, data, xmpPos + xmpSize, posEndEps);

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?>

@ -2525,9 +2525,22 @@ Exit code: 0
Command: exiv2 -u -pa eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Exiv2 exception in print action for file eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps:
Failed to read image data
Exit code: 1
Exit code: 253
Command: exiv2 -f -eX eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Exit code: 0
Command: exiv2 -ix eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Warning: Unable to find XMP metadata as announced at position: 291
Exit code: 0
Command: (2) exiv2 -ix eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Exit code: 0
Command: exiv2 -f -ex eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-binary-preview.eps <-----

@ -180,15 +180,11 @@ Exit code: 0
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Exiv2 exception in print action for file eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps:
Failed to read image data
Exit code: 1
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Exiv2 exception in extract action for file eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps:
Failed to read image data
Exit code: 1
Exit code: 0
-----> eps-flat_photoshop-cs5-binary-preview.eps <-----

Loading…
Cancel
Save