Issue #847: Ensure that Photoshop will always recognize modified Photoshop EPS files

For a full description of this issue, see:
http://dev.exiv2.org/issues/847
This commit is contained in:
vog 2012-09-14 17:01:36 +00:00
parent 2512d6fa24
commit 8f7a9d8cca
52 changed files with 4995 additions and 216 deletions

View File

@ -522,7 +522,7 @@ namespace {
EXV_DEBUG << "readWriteEpsMetadata: Found implicit BeginPageSetup at position: " << startPos << "\n";
#endif
}
if (posEndPageSetup == posEndEps && implicitPageSetup) {
if (posEndPageSetup == posEndEps && implicitPageSetup && !inRemovableEmbedding && line.size() >= 1 && line[0] != '%') {
posEndPageSetup = startPos;
#ifdef DEBUG
EXV_DEBUG << "readWriteEpsMetadata: Found implicit EndPageSetup at position: " << startPos << "\n";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,6 @@
%%Page: 1 1
%%EndPageComments
%%BeginPageSetup
%%EndPageSetup
%ImageData: 1890 1417 8 3 0 1 3 "beginimage"
%BeginPhotoshop: 4052
% 3842494D0425000000000010000000000000000000000000000000003842494D
@ -248,6 +247,7 @@
% F550F5DEF66DF6FBF78AF819F8A8F938F9C7FA57FAE7FB77FC07FC98FD29FDBA
% FE4BFEDCFF6DFFFF
%%EndICCProfile
%%EndPageSetup
gsave % EPS gsave
/hascolor
/deviceinfo where

View File

@ -17,61 +17,6 @@
%%Page: 1 1
%%EndPageComments
%%BeginPageSetup
%Exiv2BeginXMP: Before %%EndPageSetup
%Exiv2Notice: The following line is needed by Photoshop.
%begin_xml_code
/currentdistillerparams where
{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
{userdict /Exiv2_pdfmark /cleartomark load put
userdict /Exiv2_metafile_pdfmark {flushfile cleartomark} bind put}
{userdict /Exiv2_pdfmark /pdfmark load put
userdict /Exiv2_metafile_pdfmark {/PUT pdfmark} bind put} ifelse
[/NamespacePush Exiv2_pdfmark
[/_objdef {Exiv2_metadata_stream} /type /stream /OBJ Exiv2_pdfmark
[{Exiv2_metadata_stream} 2 dict begin
/Type /Metadata def /Subtype /XML def currentdict end /PUT Exiv2_pdfmark
[{Exiv2_metadata_stream}
currentfile 0 (% &&end XMP packet marker&&)
/SubFileDecode filter Exiv2_metafile_pdfmark
%Exiv2Notice: The following line is needed by Photoshop. Parameter must be exact size of XMP metadata.
%begin_xml_packet: 2376
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
% &&end XMP packet marker&&
[/Document 1 dict begin
/Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
%Exiv2Notice: The following line is needed by Photoshop.
%end_xml_code
%Exiv2EndXMP
%%EndPageSetup
%ImageData: 1890 1417 8 3 0 1 3 "beginimage"
%BeginPhotoshop: 4052
% 3842494D0425000000000010000000000000000000000000000000003842494D
@ -303,6 +248,61 @@
% F550F5DEF66DF6FBF78AF819F8A8F938F9C7FA57FAE7FB77FC07FC98FD29FDBA
% FE4BFEDCFF6DFFFF
%%EndICCProfile
%Exiv2BeginXMP: Before %%EndPageSetup
%Exiv2Notice: The following line is needed by Photoshop.
%begin_xml_code
/currentdistillerparams where
{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
{userdict /Exiv2_pdfmark /cleartomark load put
userdict /Exiv2_metafile_pdfmark {flushfile cleartomark} bind put}
{userdict /Exiv2_pdfmark /pdfmark load put
userdict /Exiv2_metafile_pdfmark {/PUT pdfmark} bind put} ifelse
[/NamespacePush Exiv2_pdfmark
[/_objdef {Exiv2_metadata_stream} /type /stream /OBJ Exiv2_pdfmark
[{Exiv2_metadata_stream} 2 dict begin
/Type /Metadata def /Subtype /XML def currentdict end /PUT Exiv2_pdfmark
[{Exiv2_metadata_stream}
currentfile 0 (% &&end XMP packet marker&&)
/SubFileDecode filter Exiv2_metafile_pdfmark
%Exiv2Notice: The following line is needed by Photoshop. Parameter must be exact size of XMP metadata.
%begin_xml_packet: 2376
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
% &&end XMP packet marker&&
[/Document 1 dict begin
/Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
%Exiv2Notice: The following line is needed by Photoshop.
%end_xml_code
%Exiv2EndXMP
%%EndPageSetup
gsave % EPS gsave
/hascolor
/deviceinfo where

View File

@ -17,61 +17,6 @@
%%Page: 1 1
%%EndPageComments
%%BeginPageSetup
%Exiv2BeginXMP: Before %%EndPageSetup
%Exiv2Notice: The following line is needed by Photoshop.
%begin_xml_code
/currentdistillerparams where
{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
{userdict /Exiv2_pdfmark /cleartomark load put
userdict /Exiv2_metafile_pdfmark {flushfile cleartomark} bind put}
{userdict /Exiv2_pdfmark /pdfmark load put
userdict /Exiv2_metafile_pdfmark {/PUT pdfmark} bind put} ifelse
[/NamespacePush Exiv2_pdfmark
[/_objdef {Exiv2_metadata_stream} /type /stream /OBJ Exiv2_pdfmark
[{Exiv2_metadata_stream} 2 dict begin
/Type /Metadata def /Subtype /XML def currentdict end /PUT Exiv2_pdfmark
[{Exiv2_metadata_stream}
currentfile 0 (% &&end XMP packet marker&&)
/SubFileDecode filter Exiv2_metafile_pdfmark
%Exiv2Notice: The following line is needed by Photoshop. Parameter must be exact size of XMP metadata.
%begin_xml_packet: 2392
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST-Photoshop-Exiv2"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
% &&end XMP packet marker&&
[/Document 1 dict begin
/Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
%Exiv2Notice: The following line is needed by Photoshop.
%end_xml_code
%Exiv2EndXMP
%%EndPageSetup
%ImageData: 1890 1417 8 3 0 1 3 "beginimage"
%BeginPhotoshop: 4052
% 3842494D0425000000000010000000000000000000000000000000003842494D
@ -303,6 +248,61 @@
% F550F5DEF66DF6FBF78AF819F8A8F938F9C7FA57FAE7FB77FC07FC98FD29FDBA
% FE4BFEDCFF6DFFFF
%%EndICCProfile
%Exiv2BeginXMP: Before %%EndPageSetup
%Exiv2Notice: The following line is needed by Photoshop.
%begin_xml_code
/currentdistillerparams where
{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
{userdict /Exiv2_pdfmark /cleartomark load put
userdict /Exiv2_metafile_pdfmark {flushfile cleartomark} bind put}
{userdict /Exiv2_pdfmark /pdfmark load put
userdict /Exiv2_metafile_pdfmark {/PUT pdfmark} bind put} ifelse
[/NamespacePush Exiv2_pdfmark
[/_objdef {Exiv2_metadata_stream} /type /stream /OBJ Exiv2_pdfmark
[{Exiv2_metadata_stream} 2 dict begin
/Type /Metadata def /Subtype /XML def currentdict end /PUT Exiv2_pdfmark
[{Exiv2_metadata_stream}
currentfile 0 (% &&end XMP packet marker&&)
/SubFileDecode filter Exiv2_metafile_pdfmark
%Exiv2Notice: The following line is needed by Photoshop. Parameter must be exact size of XMP metadata.
%begin_xml_packet: 2392
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST-Photoshop-Exiv2"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
% &&end XMP packet marker&&
[/Document 1 dict begin
/Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
%Exiv2Notice: The following line is needed by Photoshop.
%end_xml_code
%Exiv2EndXMP
%%EndPageSetup
gsave % EPS gsave
/hascolor
/deviceinfo where

View File

@ -17,7 +17,6 @@
%%Page: 1 1
%%EndPageComments
%%BeginPageSetup
%%EndPageSetup
%ImageData: 1890 1417 8 3 0 1 3 "beginimage"
%BeginPhotoshop: 4052
% 3842494D0425000000000010000000000000000000000000000000003842494D
@ -249,6 +248,7 @@
% F550F5DEF66DF6FBF78AF819F8A8F938F9C7FA57FAE7FB77FC07FC98FD29FDBA
% FE4BFEDCFF6DFFFF
%%EndICCProfile
%%EndPageSetup
gsave % EPS gsave
/hascolor
/deviceinfo where

View File

@ -17,61 +17,6 @@
%%Page: 1 1
%%EndPageComments
%%BeginPageSetup
%Exiv2BeginXMP: Before %%EndPageSetup
%Exiv2Notice: The following line is needed by Photoshop.
%begin_xml_code
/currentdistillerparams where
{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
{userdict /Exiv2_pdfmark /cleartomark load put
userdict /Exiv2_metafile_pdfmark {flushfile cleartomark} bind put}
{userdict /Exiv2_pdfmark /pdfmark load put
userdict /Exiv2_metafile_pdfmark {/PUT pdfmark} bind put} ifelse
[/NamespacePush Exiv2_pdfmark
[/_objdef {Exiv2_metadata_stream} /type /stream /OBJ Exiv2_pdfmark
[{Exiv2_metadata_stream} 2 dict begin
/Type /Metadata def /Subtype /XML def currentdict end /PUT Exiv2_pdfmark
[{Exiv2_metadata_stream}
currentfile 0 (% &&end XMP packet marker&&)
/SubFileDecode filter Exiv2_metafile_pdfmark
%Exiv2Notice: The following line is needed by Photoshop. Parameter must be exact size of XMP metadata.
%begin_xml_packet: 2376
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
% &&end XMP packet marker&&
[/Document 1 dict begin
/Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
%Exiv2Notice: The following line is needed by Photoshop.
%end_xml_code
%Exiv2EndXMP
%%EndPageSetup
%ImageData: 1890 1417 8 3 0 1 3 "beginimage"
%BeginPhotoshop: 4052
% 3842494D0425000000000010000000000000000000000000000000003842494D
@ -303,6 +248,61 @@
% F550F5DEF66DF6FBF78AF819F8A8F938F9C7FA57FAE7FB77FC07FC98FD29FDBA
% FE4BFEDCFF6DFFFF
%%EndICCProfile
%Exiv2BeginXMP: Before %%EndPageSetup
%Exiv2Notice: The following line is needed by Photoshop.
%begin_xml_code
/currentdistillerparams where
{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
{userdict /Exiv2_pdfmark /cleartomark load put
userdict /Exiv2_metafile_pdfmark {flushfile cleartomark} bind put}
{userdict /Exiv2_pdfmark /pdfmark load put
userdict /Exiv2_metafile_pdfmark {/PUT pdfmark} bind put} ifelse
[/NamespacePush Exiv2_pdfmark
[/_objdef {Exiv2_metadata_stream} /type /stream /OBJ Exiv2_pdfmark
[{Exiv2_metadata_stream} 2 dict begin
/Type /Metadata def /Subtype /XML def currentdict end /PUT Exiv2_pdfmark
[{Exiv2_metadata_stream}
currentfile 0 (% &&end XMP packet marker&&)
/SubFileDecode filter Exiv2_metafile_pdfmark
%Exiv2Notice: The following line is needed by Photoshop. Parameter must be exact size of XMP metadata.
%begin_xml_packet: 2376
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
% &&end XMP packet marker&&
[/Document 1 dict begin
/Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
%Exiv2Notice: The following line is needed by Photoshop.
%end_xml_code
%Exiv2EndXMP
%%EndPageSetup
gsave % EPS gsave
/hascolor
/deviceinfo where

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST-Photoshop-Exiv2"/>
</rdf:RDF>
</x:xmpmeta>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST-Photoshop-Exiv2"/>
</rdf:RDF>
</x:xmpmeta>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:test="http://www.example.com/"
test:test="TEST-Photoshop-Exiv2"/>
</rdf:RDF>
</x:xmpmeta>

File diff suppressed because one or more lines are too long