🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3222

Re: Help!

#3222
From: Kenneth Porter
Date: Fri, 28 Sep 1990 18:43
23 lines
1244 bytes

To my knowledge, the image operator has its own idea of gray
scale and ignores setgray values.  If you just need 50% gray,
add a second bitplane to the image and make the high-order
bitplane all zeroes.  You can synthesize this effect by
creating an appropriate procedure that adds a zero after every
bit, and pass this to image.  The ability to pass a procedure
to image to gather pixel values is quite powerful.
 
You can get other grays by replacing each bit with an n-bit
value representing a gray between 0 and 2^n-1.
 
As Jamie Zawinski points out, settransfer can also be used,
but you should modify his example to concatenate the new
transfer proc with the result of currenttransfer, so that
the result can be combined with previous transfer ops (the
most important being any builtin engine compensation).
 
Hope this helps.
 
Ken (shiva@well.sf.ca.us)
 
Technical Details
Message-ID: <20829@well.sf.ca.us>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!well!shiva
References: <265@pb2esac.UUCP> <JWZ.90Sep13112918@kolyma.lucid.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!well!shiva
From: shiva@well.sf.ca.us (Kenneth Porter)
Newsgroups: comp.lang.postscript
Subject: Re: Help!
Summary: Use of settransfer and image procs
Message-ID: <20829@well.sf.ca.us>
Date: 28 Sep 90 18:43:41 GMT
References: <265@pb2esac.UUCP> <JWZ.90Sep13112918@kolyma.lucid.com>
Lines: 23