🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6520

Re: How to make a PostScript image transparent? - Help!

#6520
From: Peter F Davis
Date: Wed, 27 Jan 1993 21:19
49 lines
1721 bytes
gerry@keele.ac.uk (G.D.Pratt) writes:

>Hi,
>I'm taking 2 PostScript files, one created from a Sunrasterfile with
>rastps and the other from pnmtops and cating them together. The first
>is a very light greyscale image and the second is a monochrome image
>with a lot of white. I want the first greyscale image to show thru' the
>white of the second monochrome image but it gets over written.

>The code where the first ends and the second starts is like this:-

>gsave
>540.0 810.0 scale
>/s 400 string def
>400 600 8
>[400 0 0 -600 0 600]
>{currentfile s readhexstring pop} image

>image data here...

>797C7E8284898B8D91929496999B9D...........
>grestore
>%!PS-Adobe-2.0 EPSF-2.0
>%%Creator: pnmtops
>%%Title: noname.ps
>%%Pages: 1
>%%BoundingBox: 15 90 597 671
>%%EndComments

>Prolog here...

>%%EndProlog
>%%Page: 1 1
>gsave
>15.3 90.5706 translate
>581.4 580.859 scale
>1074 1073 1
>[ 1074 0 0 -1073 0 1073 ]
>{ picstr readstring }
>image
>8000f9008000f9008000f9008000f9008000f9008000f9008000f9008000....

>Is there something I can put _before_ the second one starts to make it
>transparent? Or some alternative approach perhaps with PBMPLUS. Thanks.

Use imagemask instead of image for your second, bitonal image.  See the
PostScript Language Reference Manual for details.

-pd
Technical Details
Message-ID: <C1J77r.H9x@world.std.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!cs.widener.edu!eff!world!pd
References: <C1IDnt.7pL@gabriel.keele.ac.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!cs.widener.edu!eff!world!pd
From: pd@world.std.com (Peter F Davis)
Subject: Re: How to make a PostScript image transparent? - Help!
Message-ID: <C1J77r.H9x@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <C1IDnt.7pL@gabriel.keele.ac.uk>
Date: Wed, 27 Jan 1993 21:19:02 GMT
Lines: 49