/s_gw{currentfile 4 string readhexstring pop dup 3 get exch dup 2 get exch
dup 1 get exch 0 get 24 bitshift exch 16 bitshift or exch 8 bitshift or or
}bind def/s_getbyte{currentfile 1 string readhexstring pop 0 get}bind def
/s_comparrays{/s_a2 exch def/s_a1 exch def/s_cindex 0 def/s_cbool true def
s_a1 length s_a2 length eq{s_a1{s_a2 s_cindex get eq s_cbool and/s_cbool
exch def/s_cindex s_cindex 1 add def}forall s_cbool}{false}ifelse}bind def
/s_paldict 256 array def 0 1 255{s_paldict exch dup[exch dup dup dup]put}for
/s_freshword{/s_word s_gw def/w_mask s_mask{s_gw}{-1}ifelse def/bitsleft 32
def}def/aes{}bd/ass{pop 1 eq{true}{false}ifelse/s_mask exch def/s_lastbit
exch def/s_firstbit exch def/s_width exch def/s_height exch def pop/s_y3
exch def/s_x3 exch def/s_y2 exch def/s_x2 exch def/s_y1 exch def/s_x1 exch
def/s_y0 exch def/s_x0 exch def pop/s_yeig exch def/s_xeig exch def
/s_pixheight exch def/s_pixwidth exch def/s_bpp exch def gsave[s_x3 s_x0 sub
s_pixwidth div s_y3 s_y0 sub s_pixwidth div s_x1 s_x0 sub s_pixheight div
s_y1 s_y0 sub s_pixheight div s_x0 s_y0]concat/s_andmask 2 s_bpp exp cvi 1
sub def currentfile token pop 1 sub 0 exch 1 exch{s_gw pop s_paldict exch
[currentfile token pop currentfile token pop currentfile token pop
currentfile token pop]put}for s_freshword/bitsleft bitsleft s_firstbit sub
def/s_word s_word s_firstbit neg bitshift def/w_mask w_mask s_firstbit neg
bitshift def s_pixheight 1 sub -1 0{/s_ypos exch def/s_whichpix 0 def{
/s_xpos s_whichpix def s_getpixel dup -2 eq{exit}if/s_run 1 def{dup
s_nextpixel eq{/s_run s_run 1 add def s_skippixel}{exit}ifelse}loop dup -1
ne{s_paldict exch get dup 0 get exch dup 1 get exch dup 2 get exch 3 get
setcmykcolor newpath s_xpos s_ypos moveto 0 1 rlineto s_run 0 rlineto 0 -1
rlineto s_run neg 0 rlineto closepath fill}{pop}ifelse}loop/bitsleft 0 def
}for grestore}bind def/s_gmask{/s_pixmask s_mask{currentfile read pop 49 eq}
{false}ifelse def}def/assd{pop 1 eq{true}{false}ifelse/s_mask exch def
/s_lastbit exch def/s_firstbit exch def/s_width exch def/s_height exch def
pop/s_y3 exch def/s_x3 exch def/s_y2 exch def/s_x2 exch def/s_y1 exch def
/s_x1 exch def/s_y0 exch def/s_x0 exch def pop/s_yeig exch def/s_xeig exch
def/s_pixheight exch def/s_pixwidth exch def/s_bpp exch def s_bpp 16 eq{
/s_numchans 3 def/s_pixcol s_numchans array def/s_gpix{s_getbyte s_getbyte 8
bitshift or s_pixcol 0 2 index 31 and 31 div put -5 bitshift s_pixcol 1 2
index 31 and 31 div put -5 bitshift s_pixcol 2 2 index 31 and 31 div put pop
}def/s_pixelcolour{s_pixcol aload pop setrgbcolor}def}if s_bpp 24 eq{
/s_numchans 3 def/s_pixcol s_numchans array def/s_gpix{s_pixcol 0 s_getbyte
255 div put s_pixcol 1 s_getbyte 255 div put s_pixcol 2 s_getbyte 255 div
put}def/s_pixelcolour{s_pixcol aload pop setrgbcolor}def}if s_bpp 32 eq{
/s_numchans 4 def/s_pixcol s_numchans array def/s_gpix{s_pixcol 0 s_getbyte
255 div put s_pixcol 1 s_getbyte 255 div put s_pixcol 2 s_getbyte 255 div
put s_pixcol 3 s_getbyte 255 div put}def/s_pixelcolour{s_pixcol aload pop
setcmykcolor}def}if gsave[s_x3 s_x0 sub s_pixwidth div s_y3 s_y0 sub
s_pixwidth div s_x1 s_x0 sub s_pixheight div s_y1 s_y0 sub s_pixheight div
s_x0 s_y0]concat s_bpp 32 eq{1024}{768}ifelse{s_getbyte pop}repeat
s_pixheight 1 sub -1 0{/s_ypos exch def/s_whichpix 0 def{/s_xpos s_whichpix
def s_xpos s_pixwidth eq{exit}if s_gpix s_gmask s_pixmask not{s_pixelcolour
newpath s_xpos s_ypos moveto 0 1 rlineto 1 0 rlineto 0 -1 rlineto -1 0
rlineto closepath fill}{}ifelse/s_whichpix s_whichpix 1 add def}loop}for
grestore}bind def/s_getdeeppixel{s_whichpix s_pixwidth eq{-2}{bitsleft 0 eq
{s_freshword}if s_word s_andmask and w_mask s_andmask and 0 eq{pop -1}if
/s_word s_word s_bpp neg bitshift def/w_mask w_mask s_bpp neg bitshift def
/bitsleft bitsleft s_bpp sub def/s_whichpix s_whichpix 1 add def}ifelse}def
/s_getpixel{s_whichpix s_pixwidth eq{-2}{bitsleft 0 eq{s_freshword}if s_word
s_andmask and w_mask s_andmask and 0 eq{pop -1}if/s_word s_word s_bpp neg
bitshift def/w_mask w_mask s_bpp neg bitshift def/bitsleft bitsleft s_bpp
sub def/s_whichpix s_whichpix 1 add def}ifelse}def/s_nextpixel{s_whichpix
s_pixwidth eq{-2}{bitsleft 0 eq{s_freshword}if s_word s_andmask and w_mask
s_andmask and 0 eq{pop -1}if}ifelse}def/s_skippixel{/s_word s_word s_bpp neg
bitshift def/w_mask w_mask s_bpp neg bitshift def/bitsleft bitsleft s_bpp
sub def/s_whichpix s_whichpix 1 add def}def
