2 % Version 3.3 prologue for plan9 bitmap files.
18 /pagebbox [0 0 612 792] def
20 /inch {72 mul} bind def
21 /min {2 copy gt {exch} if pop} bind def
24 counttomark 2 idiv {def} repeat pop
26 landscape {/orientation 90 orientation add def} if
29 xcenter ycenter translate
30 orientation rotation mul rotate
31 xoffset inch yoffset inch translate
32 magnification dup aspectratio mul scale
34 /height height margin sub def
35 /width width margin sub def
40 /pagebbox [clippath pathbbox newpath] def
43 4 -1 roll exch 4 1 roll 4 copy
44 landscape {4 2 roll} if
47 add 2 div /xcenter exch def
48 add 2 div /ycenter exch def
49 userdict /gotpagebbox true put
52 /pagesetup {/page exch def} bind def
57 /bitspersample exch def
60 /bytelength scanlength bitspersample mult 7 add 8 idiv def
61 /picstr bytelength string def
62 /lpicstr bytelength string def
63 %% /bytelength bytelength 1 sub def
67 % First the overall scaling.
69 height scanlines div width scanlength div min
73 % Followed by the one for the unit square.
75 scanlength neg 2 div scanlines neg 2 div translate
76 scanlength scanlines scale
82 scanlength scanlines bitspersample [scanlength 0 0 scanlines neg 0 scanlines] {
83 currentfile picstr readhexstring pop} image
86 /done {/lastpage where {pop lastpage} if} def