Thread View: comp.lang.postscript
1 messages
1 total messages
Started by Peter Funk
Thu, 29 Oct 1992 07:41
Semantic of `datasrc' in imagemask ? (Does Corel 3.0 generate illegal P
Author: Peter Funk
Date: Thu, 29 Oct 1992 07:41
Date: Thu, 29 Oct 1992 07:41
39 lines
2595 bytes
2595 bytes
A while ago we had to redefine the 'imagemask' operator in postscript.
We stored all operands including the 'datasrc' procedure in a temporary
dictonary and called the procedure whenever we needed new image data.
Before calling it, we used to leave something on the operand stack for
our own needs.
A good time this worked fine emulating 'imagemask' with postscript from
many programs. To my very surprise my own imagemask procedure crashed
with postscript code from CorelDraw 3.0. The reason for this was easy
to find: They put all data in strings on the operand stack and after
that they call imagemask with a empty procedure (i.e. {}) as 'datasrc'.
This is okay for the builtin imagemask, because it does not use the
operand stack at all other than calling 'datasrc' and taking a string
from the stack after that. We found a workaround for this with a slight
loss of performance by fetching all our things from the op-stack before
we call 'datasrc' and puting them elsewhere.
Nevertheless we would like to know if this fashion of calling imagemask
shown by CorelDraw 3.0 is considered as legal postscript by the public
eye. In the PLRM 2.ed. you can read:
"imagemask uses the [...] and datasrc operands in precisely the same
way image uses them." (p. 435)
and
" If datasrc is a procedure, image executes datasrc repeatedly to
obtain the actual image data. datasrc must return (on the operand
stack) a string [...] of sample data." (p. 434)
Is it good postscript to put the image data on the stack and give image
or imagemask a empty datasrc procedure?
I would appriciate it if somebody could comment on this either public
or preferred by email to : crew@artcom0.north.de
Regards, Peter
Note: The usual "english_is_not_my_native_language"-disclaimer applies
to this "kraut"-babble.
-=-=-
Peter Funk \\ ArtCom GmbH, Schwachhauser Heerstr. 78, D-2800 Bremen 1
Work at home: Oldenburger Str.86, D-2875 Ganderkesee 1 / voice : top secret
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