summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2017-03-20 00:19:00 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2017-03-20 00:19:00 +0000
commit43f720a0c021910e6401f90514cb362a2a97abed (patch)
treee451de6bb414da150929f4eb517901c71eff8864 /Master
parent0242f4832b79f24c3676bd2fb559366265a1958c (diff)
Upgrade gs-9.20 -> gs-9.21
git-svn-id: svn://tug.org/texlive/trunk@43552 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/source/ghostscript-9.21.tar.xz (renamed from Master/source/ghostscript-9.20.tar.xz)bin26387028 -> 29164532 bytes
-rw-r--r--Master/tlpkg/tlgs/README.TEXLIVE2
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gsdll32.dllbin16363520 -> 16470016 bytes
-rw-r--r--Master/tlpkg/tlgs/bin/gsdll32.libbin9582 -> 8474 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gswin32.exebin151552 -> 151552 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gswin32c.exebin143360 -> 143360 bytes
-rw-r--r--Master/tlpkg/tlgs/lib/align.ps2
-rw-r--r--Master/tlpkg/tlgs/lib/viewpbm.ps121
8 files changed, 111 insertions, 14 deletions
diff --git a/Master/source/ghostscript-9.20.tar.xz b/Master/source/ghostscript-9.21.tar.xz
index 0a666d3bd87..b0bc4556f1d 100644
--- a/Master/source/ghostscript-9.20.tar.xz
+++ b/Master/source/ghostscript-9.21.tar.xz
Binary files differ
diff --git a/Master/tlpkg/tlgs/README.TEXLIVE b/Master/tlpkg/tlgs/README.TEXLIVE
index 4678316e51c..4f839561c52 100644
--- a/Master/tlpkg/tlgs/README.TEXLIVE
+++ b/Master/tlpkg/tlgs/README.TEXLIVE
@@ -1,5 +1,5 @@
-This directory contains a subset of the Ghostscript 9.20 distribution
+This directory contains a subset of the Ghostscript 9.21 distribution
for Windows. The only purpose of this package is to support programs
shipped with TeX Live. It's not intended for general use.
diff --git a/Master/tlpkg/tlgs/bin/gsdll32.dll b/Master/tlpkg/tlgs/bin/gsdll32.dll
index abe922144b5..4618936eccf 100755
--- a/Master/tlpkg/tlgs/bin/gsdll32.dll
+++ b/Master/tlpkg/tlgs/bin/gsdll32.dll
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gsdll32.lib b/Master/tlpkg/tlgs/bin/gsdll32.lib
index 57fa98246d9..65c82d81a62 100644
--- a/Master/tlpkg/tlgs/bin/gsdll32.lib
+++ b/Master/tlpkg/tlgs/bin/gsdll32.lib
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gswin32.exe b/Master/tlpkg/tlgs/bin/gswin32.exe
index 6036e87a1ac..601c2929bda 100755
--- a/Master/tlpkg/tlgs/bin/gswin32.exe
+++ b/Master/tlpkg/tlgs/bin/gswin32.exe
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gswin32c.exe b/Master/tlpkg/tlgs/bin/gswin32c.exe
index 0d2ea14a3f4..1939247955f 100755
--- a/Master/tlpkg/tlgs/bin/gswin32c.exe
+++ b/Master/tlpkg/tlgs/bin/gswin32c.exe
Binary files differ
diff --git a/Master/tlpkg/tlgs/lib/align.ps b/Master/tlpkg/tlgs/lib/align.ps
index 0f9339af186..7003861f903 100644
--- a/Master/tlpkg/tlgs/lib/align.ps
+++ b/Master/tlpkg/tlgs/lib/align.ps
@@ -65,7 +65,7 @@ own files:
where
ml = L * 72, mb = B * 72, mr = R * 72, mt = T * 72,
%END
-/res currentpagedevice /.MarginsHWResolution get def
+/res currentpagedevice /HWResolution get def
( x = (1 - H) * ) show res 0 get =string cvs show
(, y = (V - 1) * ) show res 1 get =string cvs show
diff --git a/Master/tlpkg/tlgs/lib/viewpbm.ps b/Master/tlpkg/tlgs/lib/viewpbm.ps
index 114c3910bae..177f22bb63e 100644
--- a/Master/tlpkg/tlgs/lib/viewpbm.ps
+++ b/Master/tlpkg/tlgs/lib/viewpbm.ps
@@ -19,6 +19,10 @@
% 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 true, it fits the output page size to the image, honouring SCALE
+% When the input is PAM (P7) RGBTAG from bitrgbtags device, -dTAG will show
+% the tags is pseudo color:
+% TEXT=1, IMAGE=2, PATH=4, UNTOUCHED=8
+% red green blue gray
/s 100 string def
/readmaxv { % <file> readmaxv -
@@ -90,8 +94,82 @@
/ncomp 3 def /invert false def /DeviceRGB setcolorspace
{ readstring pop }
} bind
+/P7 { % Assume Binary 8-bit CMYK -- assumes 'pf' is the input file
+% P7
+% WIDTH 612 %% used to set rsize and w
+% HEIGHT 792 %% used to set h
+% DEPTH 4 %% if present and not 4, then bail
+% MAXVAL 255 %% used to set maxv
+% TUPLTYPE CMYK | RGB_TAG %% if present and not CMYK or RGB_TAG, then bail
+% ENDHDR %% skip everything else up to this
+ /P7KEYS <<
+ /WIDTH { /w pf token pop def }
+ /HEIGHT { /h pf token pop def }
+ /DEPTH { /d pf token pop def d 4 ne { (*** Only CMYK PAM files supported at this time. ***) = quit } if }
+ /MAXVAL { /maxv pf token pop def }
+ /TUPLTYPE { pf token pop dup /CMYK eq 1 index /RGB_TAG eq or not {
+ (*** Only CMYK and RGB_TAG PAM files supported at this time. ***) = quit
+ } if
+ /T exch def
+ }
+ /ENDHDR { exit }
+ (#) cvn { pf 255 string readline pop pop }
+ >> def
+ { pf token not { exit } if P7KEYS exch .knownget { exec } if } loop
+ /bpc 8 def
+ /rsize w 4 mul def % same bytes per line for CMYK or RGB_TAG
+ /T load /CMYK eq {
+ /ncomp 4 def /invert false def /DeviceCMYK setcolorspace
+ w h { readstring pop }
+ } {
+ % not CMYK, must be RGB_TAG since was checked above
+ /TAG where {
+ pop
+ % show the tags as pseudo-color image
+ /ncomp 1 def /invert false def /maxv 1 def
+ [ /Indexed /DeviceRGB 255
+ % TEXT=1, IMAGE=2, PATH=4, UNTOUCHED=8
+ % red green blue gray
+ 768 string
+ dup 0 <000000 ff0000 00ff00 ffff00 0000ff ff00ff 00ffff ffffff cccccc> putinterval
+ ] setcolorspace
+ w h {
+ readstring pop
+ % discard all but the tag
+ dup length 4 div cvi
+ string % destination string
+ 0 1 2 index length 1 sub {
+ 2 index 1 index 4 mul get
+ 2 index exch 2 index exch
+ put
+ pop % done with pixel#
+ } for
+ exch pop
+ }
+ } {
+ % show the image as RGB (ignore tags)
+ /ncomp 3 def /invert false def /DeviceRGB setcolorspace
+ w h {
+ readstring pop
+ % re-pack the RGB, discard the tag
+ dup length 4 div 3 mul cvi string % destination string
+ 0 1 2 index length 3 idiv 1 sub {
+ % stack: RGBTstring destRGBstring pixel#
+ 2 index 1 index 4 mul 4 getinterval
+ 1 3 getinterval % RGB values
+ % stack RGBTstring destRGBstring pixel# RGBstring
+ 2 index exch 2 index 3 mul exch
+ putinterval
+ pop % done with pixel#
+ } for
+ exch pop
+ }
+ } ifelse
+ } ifelse
+} bind
+
.dicttomark readonly def
-/pbmsetup { % <file> <w> <h> <readproc> runpbm -
+/pbmsetup { % <file> <w> <h> <readproc> pbmsetup <imagedict>
/readproc exch def
/h exch def
/w exch def
@@ -122,20 +200,35 @@
} {
/FITPAGE where {/FITPAGE get}{false} ifelse
{
- Width 72 mul Height 72 mul
+ 0 0 translate
+ 612 765
}
{
% Scale the image (uniformly) to fit the page.
- clippath pathbbox pop pop translate
- pathbbox .min exch pop exch pop ceiling
- dup Height Width gt {
- Width mul Height div exch
+ clippath pathbbox pop pop translate % offset to the printable origin
+ pathbbox 3 -1 roll sub exch 3 -1 roll sub exch
+ % stack printable_width printable_height
+ 2 copy gt 3 1 roll .min exch
+ % stack: min(printable_w, printable_h) landscape?
+ {
+ % printable height is less than width (landscape)
+ dup Height Width gt {
+ Width mul Height div exch
+ } {
+ Height mul Width div
+ } ifelse
} {
- Height mul Width div
+ % printable width is less than height (portrait)
+ dup Height Width lt {
+ Width mul Height div exch
+ } {
+ Height mul Width div
+ } ifelse
} ifelse
} ifelse
}
- ifelse scale
+ ifelse
+ scale
end
} def
@@ -145,6 +238,7 @@
(r) file /pf exch def {
pf token not { exit } if
pbmtypes exch get pf exch exec pbmsetup
+ currentcolorspace % preserve colorspace around setpagedevice
/FITPAGE where
{
/FITPAGE get
@@ -152,14 +246,15 @@
/SCALE where
{
pop
- <</PageSize [w 72 mul SCALE mul h 72 mul SCALE mul] >>
+ <</PageSize [ 1 1 dtransform h SCALE mul exch abs div exch w SCALE mul exch abs div exch ] >>
}
{
- <</PageSize [w 72 mul h 72 mul] >>
+ <</PageSize [ 1 1 dtransform h exch abs div exch w exch abs div exch ] >>
} ifelse
setpagedevice
} if
} if
+ setcolorspace % restore colorspave in case we did setpagedevice
dup imagescale image showpage
} loop
end
@@ -215,8 +310,10 @@
{ ] { viewpbm } forall
}
{ cleartomark
- (Usage: gs [--] viewpbm.ps filename.p*m ...\n) print
- ( e.g.: gs [--] viewpbm.ps my.ppm another.ppm\n) print flush
+ (Usage: gs [-dSCALE=#.#] [-dFITPAGE] [--] viewpbm.ps filename.p*m ...\n) print
+ ( e.g.: gs [-dSCALE=#.#] [-dFITPAGE] [--] viewpbm.ps my.ppm another.ppm\n) print flush
+ ( also -dTAG option can be used to show the pseudo-color tag image from a\n) print flush
+ ( P7 RGB_TAG PAM file created by the bitrgbtags device.\n) print flush
}
ifelse
}