🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
2 messages
2 total messages Started by G.D.Pratt Wed, 27 Jan 1993 10:40
How to make a PostScript image transparent? - Help!
#6547
Author: G.D.Pratt
Date: Wed, 27 Jan 1993 10:40
47 lines
1857 bytes
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.

--
gerry pratt - workstation support programmer - university of keele - ENGLAND
email:  gerry@seq1.keele.ac.uk ( DYNIX? - just say no!! ) tel:UK 0782 583072
"these opinions are mine, mine, Mine, Mine, MINE......ALL MINE I TELL YOU!!"
Re: How to make a PostScript image transparent? - Help!
#6520
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads