diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-07-04 10:17:06 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-07-04 10:17:06 +0000 |
commit | 4a697a53a3c9c2795d549c7d5eb7a6c88c7911a9 (patch) | |
tree | b2f5967ce6865b615213754aa2aa3d41574502bc /Master/texmf-dist/scripts/epspdf/makegray.pro | |
parent | cdbc5d3bd4d89338a033d47d1368e8e30d273544 (diff) |
Added: epspdf conversion utility
git-svn-id: svn://tug.org/texlive/trunk@9222 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/epspdf/makegray.pro')
-rw-r--r-- | Master/texmf-dist/scripts/epspdf/makegray.pro | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/epspdf/makegray.pro b/Master/texmf-dist/scripts/epspdf/makegray.pro new file mode 100644 index 00000000000..67dc5705839 --- /dev/null +++ b/Master/texmf-dist/scripts/epspdf/makegray.pro @@ -0,0 +1,29 @@ +%! +% makegray.pro, PostScript header file for grayscale conversion. + +%%%%% +% Siep Kroonenberg, n dot s dot kroonenberg at rug dot nl +% Public domain. +%%%%% + +% This version only handles some basic color models, +% and doesn't handle image data at all. +% A more robust version would be warmly welcomed. + +%%%%<< /ProcessColorModel /DeviceGray >> setpagedevice +userdict begin +% .11*B + .59*G + .3*R +/setrgbcolor { + 0.11 mul exch 0.59 mul add exch 0.3 mul add + systemdict begin setgray end +} def +% 1.0 - min(1.0, .3*C + .59*M + .11*Y + B) +/setcmykcolor { + exch 0.11 mul add + exch 0.59 mul add + exch 0.3 mul add + dup 1 gt {pop 1} if + 1 exch sub + systemdict begin setgray end +} def +end |