PATH:
usr
/
share
/
ghostscript
/
lib
% Copyright (C) 2001-2018 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or % implied. % % This software is distributed under license and may not be copied, % modified or distributed except as expressly authorized under the terms % of the license contained in the file LICENSE in this distribution. % % Refer to licensing information at http://www.artifex.com or contact % Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, % CA 94945, U.S.A., +1(415)492-9861, for further information. % % viewpcx.ps % Display a PCX file. % Requires the Level 2 `image' operator (to handle variable pixel widths). % 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 FITPAGE is true it fits the output page size to the image, honouring SCALE % ****NOTE: does not handle multi-plane images with palette. /pcxbytes [ 0 1 255 { 64 string exch 0 1 63 { 3 copy exch put pop } for pop } for ] readonly def /readpcx { % - readpcx <str> f % gets replaced dup read not { pop () } { dup 192 lt { ( ) dup 0 4 -1 roll put exch pop } { 192 sub //pcxbytes 3 -1 roll read pop get exch 0 exch getinterval } ifelse } ifelse } def /get2 % <string> <index> get2 <int> { 2 copy get 3 1 roll 1 add get 8 bitshift add } bind def /dsproc { df s readstring pop % s gets filled in s1 () ne { df s1 readstring pop pop } if % discard padding bytes } def % don't bind, must be writable /viewpcx % <filename> viewpcx - { 100 dict begin /fname 1 index def /f exch (r) file def % Read and unpack the header. /header f 128 string readstring pop def /version header 1 get def /bpp header 3 get def /w header 8 get2 header 4 get2 sub 1 add def /h header 10 get2 header 6 get2 sub 1 add def /FITPAGE where { /FITPAGE get { 5 dict begin /SCALE where { pop /Width w SCALE mul def /Height h SCALE mul def } { /Width w def /Height h def } ifelse % we've already set the image color space, so % push it on the stack, and set it again after % setting the page size <</PageSize [Width Height] >> setpagedevice end } if } { /FITPAGE false def } ifelse /nplanes header 65 get def /bpl header 66 get2 def /palinfo header 68 get2 def /nbits bpp nplanes mul def version 5 eq { nbits 8 le { /cspace [/Indexed /DeviceRGB 1 bpp bitshift 1 sub f fileposition 1 nbits bitshift 3 mul string fname status pop pop pop exch pop 1 index length sub f exch setfileposition f exch readstring pop exch f exch setfileposition ] def /decode [0 cspace 2 get] def } { /cspace /DeviceRGB def /decode [0 1 0 1 0 1] def } ifelse } { /cspace [/Indexed /DeviceRGB 1 bpp bitshift 1 sub header 16 1 nbits bitshift 16 .min 3 mul getinterval ] def /decode [0 cspace 2 get] def } ifelse % Set up scaling. /SCALE where { pop FITPAGE { % Map pixels SCALE-for-1. Assume orthogonal transformation. w SCALE mul h SCALE mul } { % Map pixels SCALE-for-1. Assume orthogonal transformation. w 1 0 dtransform add abs div SCALE mul h 0 1 dtransform add abs div SCALE mul } ifelse } { FITPAGE { w h } { % Scale the image (uniformly) to fit the page. clippath pathbbox pop pop translate pathbbox .min exch pop exch pop ceiling dup h w gt { w mul h div exch } { h mul w div } ifelse } ifelse } ifelse scale % Since the number of bytes per line is always even, % it may not match the width specification. /wbpl w bpp mul 7 add 8 idiv def % Define the data source procedure. /s1 bpl wbpl sub string def /df /readpcx load copyarray dup 0 f put cvx bind readonly 0 () /SubFileDecode filter def /dsource [ nplanes { /dsproc load copyarray dup 1 wbpl string put cvx bind readonly } repeat ] def % Construct the image dictionary. 20 dict begin % image dictionary /ImageType 1 def /Width w def /Height h def /ImageMatrix [w 0 0 h neg 0 h] def /BitsPerComponent bpp def /Decode decode def /DataSource dsource dup length 1 gt { /MultipleDataSources true def } { 0 get } ifelse def currentdict end % Finally, display the image. cspace setcolorspace image showpage df closefile f closefile end } bind def % If the program was invoked from the command line, run it now. [ shellarguments { counttomark 1 ge { ] { viewpcx } forall } { cleartomark (Usage: gs -- viewpcx.ps filename.pcx ...\n) print ( e.g.: gs -- viewpcx.ps my.pcx another.pcx\n) print flush } ifelse } { pop } ifelse
[-] rollconv.ps
[edit]
[-] acctest.ps
[edit]
[-] bjc610b7.upp
[edit]
[-] viewps2a.ps
[edit]
[-] ras3.upp
[edit]
[-] stc1520h.upp
[edit]
[-] stc800p.upp
[edit]
[-] PM820p.upp
[edit]
[-] st640ih.upp
[edit]
[-] stc_l.upp
[edit]
[-] bj8gc12f.upp
[edit]
[-] bj8oh06n.upp
[edit]
[-] viewmiff.ps
[edit]
[-] docie.ps
[edit]
[-] viewgif.ps
[edit]
[-] gs_wl2_e.ps
[edit]
[-] printafm.ps
[edit]
[-] Stp720p.upp
[edit]
[-] st640plg.upp
[edit]
[-] sipixa6.upp
[edit]
[-] lines.ps
[edit]
[-] caption.ps
[edit]
[-] bjc610a0.upp
[edit]
[-] cbjc600.ppd
[edit]
[-] pphs.ps
[edit]
[-] bjc6000a1.upp
[edit]
[-] dnj750m.upp
[edit]
[-] cdj690ec.upp
[edit]
[-] viewpbm.ps
[edit]
[-] Stp720pl.upp
[edit]
[-] cdj550.upp
[edit]
[-] Stc670p.upp
[edit]
[+]
..
[-] gs_il2_e.ps
[edit]
[-] ras24.upp
[edit]
[-] gs_t.xpm
[edit]
[-] bjc610b6.upp
[edit]
[-] stocht.ps
[edit]
[-] viewpcx.ps
[edit]
[-] gs_l_m.xbm
[edit]
[-] gs_s.xbm
[edit]
[-] image-qa.ps
[edit]
[-] landscap.ps
[edit]
[-] dmp_site.ps
[edit]
[-] bjc610a4.upp
[edit]
[-] necp2x.upp
[edit]
[-] align.ps
[edit]
[-] ps2epsi.ps
[edit]
[-] gslp.ps
[edit]
[-] stc740ih.upp
[edit]
[-] bj8.rpd
[edit]
[-] gs_ce_e.ps
[edit]
[-] st640ihg.upp
[edit]
[-] ghostpdf.ppd
[edit]
[-] stc600ih.upp
[edit]
[-] Stc680pl.upp
[edit]
[-] stc.upp
[edit]
[-] stcany_h.upp
[edit]
[-] gs_t_m.xbm
[edit]
[-] stcinfo.ps
[edit]
[-] gs_wl5_e.ps
[edit]
[-] stc500ph.upp
[edit]
[-] gs_wl1_e.ps
[edit]
[-] stc300bl.upp
[edit]
[-] gs_l.xpm
[edit]
[-] ras32.upp
[edit]
[-] winmaps.ps
[edit]
[-] stc500p.upp
[edit]
[-] bjc6000b1.upp
[edit]
[-] mkcidfm.ps
[edit]
[-] pdf2dsc.ps
[edit]
[-] bjc610b8.upp
[edit]
[-] pf2afm.ps
[edit]
[-] s400b1.upp
[edit]
[-] traceimg.ps
[edit]
[-] traceop.ps
[edit]
[-] Stc760pl.upp
[edit]
[-] stc300bm.upp
[edit]
[-] st640pg.upp
[edit]
[-] stc600p.upp
[edit]
[-] st640p.upp
[edit]
[-] Stc777p.upp
[edit]
[-] uninfo.ps
[edit]
[-] ps2ai.ps
[edit]
[-] gs_l.xbm
[edit]
[-] bjc610a2.upp
[edit]
[-] gs_t.xbm
[edit]
[-] bj8hg12f.upp
[edit]
[-] Stp870pl.upp
[edit]
[-] prfont.ps
[edit]
[-] bj8pa06n.upp
[edit]
[-] gs_lgo_e.ps
[edit]
[-] gs_ksb_e.ps
[edit]
[-] stc800pl.upp
[edit]
[-] gs_kanji.ps
[edit]
[-] font2pcl.ps
[edit]
[-] Stc740p.upp
[edit]
[-] stc200_h.upp
[edit]
[-] bjc610a8.upp
[edit]
[-] viewjpeg.ps
[edit]
[-] pfbtopfa.ps
[edit]
[-] bjc610b2.upp
[edit]
[-] necp2x6.upp
[edit]
[-] gs_s.xpm
[edit]
[-] jispaper.ps
[edit]
[-] ppath.ps
[edit]
[-] ras4.upp
[edit]
[-] bjc610a1.upp
[edit]
[-] Stc777pl.upp
[edit]
[-] Stc760p.upp
[edit]
[-] stc300.upp
[edit]
[-] stcany.upp
[edit]
[-] gs_s_m.xbm
[edit]
[-] stc_h.upp
[edit]
[-] ras8m.upp
[edit]
[-] bjc610a6.upp
[edit]
[-] gs_m_m.xbm
[edit]
[-] gs_m.xpm
[edit]
[-] stc600pl.upp
[edit]
[-] stc2s_h.upp
[edit]
[-] bjc610a7.upp
[edit]
[-] PM820pl.upp
[edit]
[-] cid2code.ps
[edit]
[-] bjc610a5.upp
[edit]
[-] stc640p.upp
[edit]
[-] ht_ccsto.ps
[edit]
[-] cdj690.upp
[edit]
[-] st640pl.upp
[edit]
[-] PDFX_def.ps
[edit]
[-] bjc610a3.upp
[edit]
[-] zeroline.ps
[edit]
[-] dmp_init.ps
[edit]
[-] Stc680p.upp
[edit]
[-] PM760p.upp
[edit]
[-] bjc610b3.upp
[edit]
[-] PM760pl.upp
[edit]
[-] sharp.upp
[edit]
[-] stc2_h.upp
[edit]
[-] bj8ts06n.upp
[edit]
[-] stc800ih.upp
[edit]
[-] bjc610b4.upp
[edit]
[-] dnj750c.upp
[edit]
[-] bj8pp12f.upp
[edit]
[-] stc2.upp
[edit]
[-] s400a1.upp
[edit]
[-] bjc610b1.upp
[edit]
[-] viewcmyk.ps
[edit]
[-] PDFA_def.ps
[edit]
[-] cbjc800.ppd
[edit]
[-] ras1.upp
[edit]
[-] gs_lgx_e.ps
[edit]
[-] Stp870p.upp
[edit]
[-] escp_24.src
[edit]
[-] stcolor.ps
[edit]
[-] Stc740pl.upp
[edit]
[-] gs_m.xbm
[edit]
[-] Stc670pl.upp
[edit]
[-] gsnup.ps
[edit]