Professional Documents
Culture Documents
% viewcmyk.ps
% Display a raw CMYK file.
% Requires the colorimage operator.
% If SCALE is defined, maps input pixels to output pixels with that scale;
% if SCALE is undefined, scales the image to fit the page.
% If BITS is defined, it is the number of bits per sample (1,2,4,8);
% if BITS is undefined, its default value is 1.
% Colorspace defaults to cmyk, but -dGray or -dRGB can change it
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 000000 000000 000000 000000
>
] def
/BITS 8 def % change to 4 bit indexed
} if
BITS 1 eq {
/CS
[ /Indexed /DeviceRGB 15 <
000000 0000FF 00FF00 00FFFF FF0000 FF00FF FFFF00 FFFFFF
000000 0000FF 00FF00 00FFFF FF0000 FF00FF FFFF00 FFFFFF
>
] def
/BITS 4 def % change to 4 bit indexed
} if
}
ifelse
}
{ 4 /CS /DeviceCMYK def } % DeviceCMYK is 4 component
ifelse
}
ifelse
def
% If the program was invoked from the command line, run it now.
[ shellarguments {
counttomark 2 eq {
cvi viewraw
} {
cleartomark
(Usage: gs -- viewraw filename.raw width\n) print
( e.g.: gs -- viewraw my.raw 2550\n) print flush
} ifelse
} {
pop
} ifelse