102 lines
2.4 KiB
Plaintext
102 lines
2.4 KiB
Plaintext
level2 {
|
|
band 0 eq {
|
|
/DeviceCMYK
|
|
} {/DeviceGray} ifelse
|
|
setcolorspace currentdict /PhotoshopDuotoneColorSpace undef currentdict /PhotoshopDuotoneAltColorSpace undef } if
|
|
/picstr1 cols string def
|
|
/picstr2 cols string def
|
|
/picstr3 cols string def
|
|
/picstr4 cols string def
|
|
/picstr5 cols string def
|
|
/_rowpadstr cols string def
|
|
/rawreaddata {currentfile exch readhexstring pop} def
|
|
/padreaddata { _topPad 0 gt { /_topPad _topPad 1 sub def pop _rowpadstr }
|
|
{ _subImageRows 0 gt { /_subImageRows _subImageRows 1 sub def
|
|
dup _leftPad _picsubstr rawreaddata putinterval }
|
|
{ pop _rowpadstr } ifelse } ifelse } def
|
|
/image2 level2 {/image load def} {{begin
|
|
Width Height BitsPerComponent ImageMatrix
|
|
Decode length 2 eq
|
|
{/DataSource load image} if
|
|
Decode length 6 eq
|
|
{DataSource 0 get DataSource 1 get DataSource 2 get
|
|
true 3 colorimage} if
|
|
Decode length 8 eq
|
|
{DataSource 0 get DataSource 1 get
|
|
DataSource 2 get DataSource 3 get
|
|
true 4 colorimage} if
|
|
end} def} ifelse
|
|
/_image2 level2 {/_image load def} {{begin
|
|
Width Height BitsPerComponent ImageMatrix
|
|
/DataSource load _image end} def} ifelse
|
|
/beginimage {
|
|
band 0 eq band 5 eq or
|
|
{image2} if
|
|
band 1 ge band 4 le and
|
|
{{1 exch sub dummy exec} dup 3 _currenttransfer put
|
|
_settransfer _image2} if
|
|
band 6 eq
|
|
{negative {{pop 0}} {{pop 1}} ifelse
|
|
_settransfer _image2} if
|
|
} def
|
|
/readdata /rawreaddata load bind def
|
|
12 dict begin
|
|
/ImageType 1 def
|
|
/Width cols def
|
|
/Height rows def
|
|
/ImageMatrix [cols 0 0 rows 0 0] def
|
|
/BitsPerComponent 8 def
|
|
band 0 eq
|
|
{/Decode [0 1 0 1 0 1 0 1] def}
|
|
{/Decode [0 1] def} ifelse
|
|
band 0 eq {
|
|
/MultipleDataSources true def
|
|
/DataSource [
|
|
{picstr1 readdata}
|
|
{picstr2 readdata}
|
|
{picstr3 readdata}
|
|
{picstr4 readdata picstr5 readdata pop}
|
|
] def} if
|
|
band 1 eq {
|
|
/DataSource {
|
|
picstr1 readdata
|
|
picstr2 readdata pop
|
|
picstr3 readdata pop
|
|
picstr4 readdata pop
|
|
picstr5 readdata pop
|
|
} def} if
|
|
band 2 eq {
|
|
/DataSource {
|
|
picstr1 readdata pop
|
|
picstr2 readdata
|
|
picstr3 readdata pop
|
|
picstr4 readdata pop
|
|
picstr5 readdata pop
|
|
} def} if
|
|
band 3 eq {
|
|
/DataSource {
|
|
picstr1 readdata pop
|
|
picstr2 readdata pop
|
|
picstr3 readdata
|
|
picstr4 readdata pop
|
|
picstr5 readdata pop
|
|
} def} if
|
|
band 4 eq {
|
|
/DataSource {
|
|
picstr1 readdata pop
|
|
picstr2 readdata pop
|
|
picstr3 readdata pop
|
|
picstr4 readdata
|
|
picstr5 readdata pop
|
|
} def} if
|
|
band 5 ge {
|
|
/DataSource {
|
|
picstr1 readdata pop
|
|
picstr2 readdata pop
|
|
picstr3 readdata pop
|
|
picstr4 readdata pop
|
|
picstr5 readdata
|
|
} def} if
|
|
currentdict end
|
|
beginimage
|