Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
how to invert a postscript file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
greghodg  
View profile  
 More options Jun 1 1999, 3:00 am
Newsgroups: comp.lang.postscript
From: gregh...@my-deja.com
Date: 1999/06/01
Subject: how to invert a postscript file
I've got an image in postscript format that I need to print inverted
(ie: white->black and black->white, not rotated or mirrored).  GSview on
the PC doesn't seem to have this ability.  Is there a postscript command
to cause a page to print in inverse?

Thanks in advance

Greg Hodgdon

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Dorman  
View profile  
 More options Jun 3 1999, 3:00 am
Newsgroups: comp.lang.postscript
From: r...@panix.com (Rod Dorman)
Date: 1999/06/03
Subject: Re: how to invert a postscript file

In article <7j0u0s$7o...@nnrp1.deja.com>,  <gregh...@my-deja.com> wrote:
>I've got an image in postscript format that I need to print inverted
>(ie: white->black and black->white, not rotated or mirrored).  GSview on
>the PC doesn't seem to have this ability.  Is there a postscript command
>to cause a page to print in inverse?

Assuming a color space of DeviceGray (i.e. setgray is the only color
value setting command) you could try the following:
        /MySetGray {setgray} bind def
        /setgray {1 exch sub MySetGray} bind def
to "reverse" the behaviour of setgray.

To set the initial color to white do:
        1 MySetGray

You probably need to paint the page with the inverse of the default
white paper, in otherwords, black:
        gsave initclip clippath 0 MySetGray fill grestore

Note that the presence of initclip means you won't be able to imbed
the page into another page.

This is gonna use up a lot of toner, why do you need/want to do this?

--
                                        -- Rod --
r...@polylogics.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
peterfdavis  
View profile  
 More options Jun 4 1999, 3:00 am
Newsgroups: comp.lang.postscript
From: peterfda...@my-deja.com
Date: 1999/06/04
Subject: Re: how to invert a postscript file
In article <7j0u0s$7o...@nnrp1.deja.com>,

  gregh...@my-deja.com wrote:
> I've got an image in postscript format that I need to print inverted
> (ie: white->black and black->white, not rotated or mirrored).  GSview
on
> the PC doesn't seem to have this ability.  Is there a postscript
command
> to cause a page to print in inverse?

The most reliable way to do this is by setting up transfer functions
outside the main PostScript code.  Then, assuming the code you're
printing doesn't further muck with the transfer functions, you should
get the effect you want.

The simplest (Level 1) approach is something like

    {1 exch sub} settransfer

To be polite, you should consider that fact that there may already be a
transfer function set, and concatenate it to yours:

    [currenttransfer //exec {1 exch sub} //exec] cvx bind settransfer

I think that's right.  I haven't actually tested this code.  If you
want to deal with separate transfer functions for separate colors,
etc., it gets more complicated, but it's about the same idea.  That's
left as an exercise for the reader.

-pd

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google