libvips/contrib/vips2dj/share/vips2dj/lab/head5

71 lines
1.7 KiB
Plaintext

level2 {
band 0 eq {
[/CIEBasedABC 5 dict begin
/RangeABC [0 100 -128 127 -128 127] def
/DecodeABC [{16 add 116 div} bind
{500 div} bind {200 div} bind] def
/MatrixABC [1 1 1 1 0 0 0 0 -1] def
/DecodeLMN [
{dup 6 29 div ge {dup dup mul mul}
{4 29 div sub 108 841 div mul}
ifelse 0.9505 mul} bind
{dup 6 29 div ge {dup dup mul mul}
{4 29 div sub 108 841 div mul}
ifelse} bind
{dup 6 29 div ge {dup dup mul mul}
{4 29 div sub 108 841 div mul}
ifelse 1.0890 mul} bind
] def
/WhitePoint [0.9505 1 1.0890] def
currentdict end]
} {/DeviceGray} ifelse
setcolorspace} if
/picstr1 cols string def
/picstr2 cols string def
/picstr3 cols string def
/readdata {currentfile exch readhexstring pop} 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 4 eq or band 5 eq or
{image2}
{negative {{pop 0}} {{pop 1}} ifelse
_settransfer _image2} ifelse
} 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 level2 and
{/Decode [0 100 -128 127 -128 127] def
/MultipleDataSources true def
/DataSource [
{picstr1 readdata}
{picstr2 readdata}
{picstr3 readdata}
] def}
{/Decode [0 1] def
/DataSource {
picstr1 readdata
picstr2 readdata pop
picstr3 readdata pop
} def}
ifelse
currentdict end
beginimage