You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.4 KiB

1 month ago
  1. % Copyright (C) 2001-2023 Artifex Software, Inc.
  2. % All Rights Reserved.
  3. %
  4. % This software is provided AS-IS with no warranty, either express or
  5. % implied.
  6. %
  7. % This software is distributed under license and may not be copied,
  8. % modified or distributed except as expressly authorized under the terms
  9. % of the license contained in the file LICENSE in this distribution.
  10. %
  11. % Refer to licensing information at http://www.artifex.com or contact
  12. % Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
  13. % CA 94129, USA, for further information.
  14. %
  15. % helper file to simplify use of Stochastic Halftone - uses ht_ccsto.ps
  16. % This file sets the /StochasticDefault /Halftone as the current
  17. % and the /Default halftoning, loading the Stochastic halftone
  18. % if required.
  19. % Stochastic halftoning is recommended for inkjet printers, and may
  20. % produce output as pleasing as the more computationally expensive
  21. % "error diffusion" that *some* device drivers provide.
  22. % For printing technologies other than inkjet, Stochastic halftoning
  23. % may not look better than standard screening. In particular, thermal
  24. % transfer and direct thermal tend to be better with standard ordered
  25. % screening methods. Some laser printers may produce "smoother"
  26. % looking gray shades with Stochastic halftoning. Try it, and if
  27. % you like it, use it.
  28. % Note that this /Default halftone can be overridden by PostScript
  29. % operators that set the screening or halftone (such as setscreen).
  30. % To make Stochastic Halftone be "sticky" so that other screening and
  31. % halftone setting in the subsequent PostScript will be ignored, use:
  32. % -c "<< /HalftoneMode 1 >> setuserparams"
  33. % on the command line prior to the file to be processed. For example,
  34. %
  35. % gs stocht.ps -c "<< /HalftoneMode 1 >> setuserparams" -f examples/tiger.eps
  36. % Alternatively, the command to set the /HalftoneMode userparam can be
  37. % concatenated to this file (see below).
  38. % =====================================================================
  39. % Try to get the previously defined resource
  40. { /StochasticDefault /Halftone findresource } stopped
  41. {
  42. pop pop
  43. % Need to load the Stochastic Halftone using the lib file
  44. (ht_ccsto.ps) runlibfile
  45. } if
  46. % If we didn't error out by now, then go ahead and define the /Default
  47. /StochasticDefault /Halftone findresource
  48. /Default exch /Halftone defineresource
  49. sethalftone % Use the halftone
  50. % Uncomment the next line to make the Stocahstic halftoning be "sticky"
  51. % << /HalftoneMode 1 >> setuserparams