summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/lib/viewrgb.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/lib/viewrgb.ps')
-rw-r--r--Master/tlpkg/tlgs/lib/viewrgb.ps100
1 files changed, 50 insertions, 50 deletions
diff --git a/Master/tlpkg/tlgs/lib/viewrgb.ps b/Master/tlpkg/tlgs/lib/viewrgb.ps
index 18d87c3a544..603ef6710e8 100644
--- a/Master/tlpkg/tlgs/lib/viewrgb.ps
+++ b/Master/tlpkg/tlgs/lib/viewrgb.ps
@@ -1,22 +1,22 @@
% Copyright (C) 2009 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 that
% license. Refer to licensing information at http://www.artifex.com/
% or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
-% $Id: viewrgb.ps 9517 2009-03-02 19:47:28Z giles $
+% $Id$
% viewrgb.ps
% Display a raw RGB file created by -sDEVICE=bitrgb.
% 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,8,12).
-% NB: BITS=1 (corresponding to -dGrayValues=16) is not supported.
+% NB: BITS=4 (corresponding to -dGrayValues=16) is not supported.
% if BITS is undefined, its default value is 1.
/viewrgb { % <filename> <width> viewrgb -
@@ -34,46 +34,46 @@
} if
mul 7 add 8 idiv idiv def
QUIET not { (Dimensions: ) print [w h] == flush } if
- % Set up scaling.
+ % Set up scaling.
/SCALE where {
pop
- % Map pixels SCALE-for-1. Assume orthogonal transformation.
+ % Map pixels SCALE-for-1. Assume orthogonal transformation.
SCALE 1 0 dtransform add abs div
SCALE 0 1 dtransform add abs div
} {
- % Scale the image (uniformly) to fit the page.
+ % Scale the image (uniformly) to fit the page.
clippath pathbbox pop pop translate
pathbbox 3 -1 roll sub h div
3 1 roll exch sub w div .min dup
} ifelse scale
bpc 1 eq {
[ /Indexed /DeviceRGB 15 <
- 000000
- 0000FF
- 00FF00
- 00FFFF
- FF0000
- FF00FF
- FFFF00
- FFFFFF
- 000000
- 0000FF
- 00FF00
- 00FFFF
- FF0000
- FF00FF
- FFFF00
- FFFFFF
+ 000000
+ 0000FF
+ 00FF00
+ 00FFFF
+ FF0000
+ FF00FF
+ FFFF00
+ FFFFFF
+ 000000
+ 0000FF
+ 00FF00
+ 00FFFF
+ FF0000
+ FF00FF
+ FFFF00
+ FFFFFF
>
] setcolorspace
/BPC 4 def % change to 4 bit indexed
} {
bpc 2 eq {
[ /Indexed /DeviceRGB 255 <
- 000000 000055 0000AA 0000FF
- 005500 005555 0055AA 0055FF
- 00AA00 00AA55 00AAAA 00AAFF
- 00FF00 00FF55 00FFAA 00FFFF
+ 000000 000055 0000AA 0000FF
+ 005500 005555 0055AA 0055FF
+ 00AA00 00AA55 00AAAA 00AAFF
+ 00FF00 00FF55 00FFAA 00FFFF
550000 550055 5500AA 5500FF
555500 555555 5555AA 5555FF
55AA00 55AA55 55AAAA 55AAFF
@@ -87,25 +87,25 @@
FFAA00 FFAA55 FFAAAA FFAAFF
FFFF00 FFFF55 FFFFAA FFFFFF
- 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
- 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
>
] setcolorspace
/BPC 8 def % change to 4 bit indexed
@@ -117,13 +117,13 @@
}
ifelse
<< /ImageType 1
- /Width w
- /Height h
- /BitsPerComponent BPC
- /ImageMatrix [1 0 0 -1 0 h]
- /DataSource f
- /MultipleDataSources false
- bpc 4 lt { /Decode [ 0 [ 0 15 255 ] bpc get ] } { /Decode [ 0 1 0 1 0 1 ] } ifelse
+ /Width w
+ /Height h
+ /BitsPerComponent BPC
+ /ImageMatrix [1 0 0 -1 0 h]
+ /DataSource f
+ /MultipleDataSources false
+ bpc 4 lt { /Decode [ 0 [ 0 15 255 ] bpc get ] } { /Decode [ 0 1 0 1 0 1 ] } ifelse
>> image
showpage
f closefile