#790: Added workaround for EPS files generated by CorelDRAW
This commit is contained in:
@@ -393,6 +393,7 @@ namespace {
|
||||
unsigned int depth = 0;
|
||||
const unsigned int maxDepth = UINT_MAX;
|
||||
bool illustrator8 = false;
|
||||
bool corelDraw = false;
|
||||
bool implicitPage = false;
|
||||
bool implicitPageTrailer = false;
|
||||
bool inDefaultsPreviewPrologSetup = false;
|
||||
@@ -547,6 +548,8 @@ namespace {
|
||||
posAi7ThumbnailEndData = startPos;
|
||||
} else if (posEndComments == posEndEps && line == "%%EndComments") {
|
||||
posEndComments = startPos;
|
||||
} else if (inDefaultsPreviewPrologSetup && startsWith(line, "%%BeginResource: procset wCorel")) {
|
||||
corelDraw = true;
|
||||
} else if (line == "%%EndPreview") {
|
||||
inDefaultsPreviewPrologSetup = false;
|
||||
} else if (line == "%%EndDefaults") {
|
||||
@@ -922,6 +925,10 @@ namespace {
|
||||
writeTemp(*tempIo, "%%BeginPageSetup" + lineEnding);
|
||||
}
|
||||
writeTemp(*tempIo, "%Exiv2BeginXMP: Before %%EndPageSetup" + lineEnding);
|
||||
if (corelDraw) {
|
||||
writeTemp(*tempIo, "%Exiv2Notice: The following line is needed by CorelDRAW." + lineEnding);
|
||||
writeTemp(*tempIo, "@rs" + lineEnding);
|
||||
}
|
||||
if (posBeginPhotoshop != posEndEps) {
|
||||
writeTemp(*tempIo, "%Exiv2Notice: The following line is needed by Photoshop." + lineEnding);
|
||||
writeTemp(*tempIo, "%begin_xml_code" + lineEnding);
|
||||
@@ -953,6 +960,10 @@ namespace {
|
||||
writeTemp(*tempIo, "%Exiv2Notice: The following line is needed by Photoshop." + lineEnding);
|
||||
writeTemp(*tempIo, "%end_xml_code" + lineEnding);
|
||||
}
|
||||
if (corelDraw) {
|
||||
writeTemp(*tempIo, "%Exiv2Notice: The following line is needed by CorelDRAW." + lineEnding);
|
||||
writeTemp(*tempIo, "@sv" + lineEnding);
|
||||
}
|
||||
writeTemp(*tempIo, "%Exiv2EndXMP" + lineEnding);
|
||||
if (line != "%%EndPageSetup") {
|
||||
writeTemp(*tempIo, "%%EndPageSetup" + lineEnding);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -1,4 +1,54 @@
|
||||
|
||||
-----> eps-flat_coreldraw-x3-lev2.eps <-----
|
||||
|
||||
Command: exiv2 -u -pa eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 253
|
||||
|
||||
Command: exiv2 -dx eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -f -ex eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Restore: eps-flat_coreldraw-x3-lev2.eps
|
||||
|
||||
Command: exiv2 -f -eX eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -ix eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: (2) exiv2 -ix eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -f -ex eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
-----> eps-flat_coreldraw-x5-lev2.eps <-----
|
||||
|
||||
Command: exiv2 -u -pa eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 253
|
||||
|
||||
Command: exiv2 -dx eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -f -ex eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Restore: eps-flat_coreldraw-x5-lev2.eps
|
||||
|
||||
Command: exiv2 -f -eX eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -ix eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: (2) exiv2 -ix eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -f -ex eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
-----> eps-flat_empty-eof-noeol.eps <-----
|
||||
|
||||
Command: exiv2 -u -pa eps-flat_empty-eof-noeol.eps
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,22 @@
|
||||
|
||||
-----> eps-flat_coreldraw-x3-lev2.eps <-----
|
||||
|
||||
Command: exiv2 -pp eps-flat_coreldraw-x3-lev2.eps
|
||||
Preview 1: image/tiff, 1164x1054 pixels, 1229768 bytes
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -f -ep eps-flat_coreldraw-x3-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
-----> eps-flat_coreldraw-x5-lev2.eps <-----
|
||||
|
||||
Command: exiv2 -pp eps-flat_coreldraw-x5-lev2.eps
|
||||
Preview 1: image/tiff, 422x348 pixels, 152914 bytes
|
||||
Exit code: 0
|
||||
|
||||
Command: exiv2 -f -ep eps-flat_coreldraw-x5-lev2.eps
|
||||
Exit code: 0
|
||||
|
||||
-----> eps-flat_inkscape-epsi.eps <-----
|
||||
|
||||
Command: exiv2 -pp eps-flat_inkscape-epsi.eps
|
||||
|
||||
@@ -19,7 +19,9 @@ fi
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Tests
|
||||
images="eps/eps-flat_inkscape-epsi.eps \
|
||||
images="eps/eps-flat_coreldraw-x3-lev2.eps \
|
||||
eps/eps-flat_coreldraw-x5-lev2.eps \
|
||||
eps/eps-flat_inkscape-epsi.eps \
|
||||
eps/eps-flat_oodraw_ai-10-lev2.eps \
|
||||
eps/eps-flat_oodraw_ai-8-lev2.eps \
|
||||
eps/eps-flat_oodraw_ai-8-lev3.eps \
|
||||
|
||||
Reference in New Issue
Block a user