At 11:07 PM +0100 on 11/22/99, M. Uli Kusterer wrote:
>>But it'd be hard to convert everything to text form -- e.g., how do you
>>convert a 24-bit pixmap to text?
>
>Anthony,
>
> not a problem. Since our variables have no problem with NULL characters,
>we'd just need something like the pictureData property (which returns a
>long stream of bytes representing the image data) and then we'd say:
>
> put the pictureData of imageBeingEdited into the undoStorage
And then try and teach scripters about the format of pixmaps, handle
conversions between fromats, platforms, color sets, bit depths, check to
make sure pixmaps are valid before use, etc., all quickly and transparently
to the scripter & user.
If we have a property like this, undoubtebly people will want to modify
that data. Ok, no big deal, right?
Wrong. First, decide on a standard format. 8-bit? 16-bit? 24-bit? 32-bit?
Better go with 32, because others will loose information.
Next, color set. 8A, 8R, 8G, 8B? (8A means 8 bits of alpha, etc.)
2A, 10R, 10G, 10B?
4A, 10R, 10G, 8B?
Should it even be RGB? 55% red is not the same on any two
systems; CIE is supposed to be. So why not CIE colors? Or
how about HSV? HSL? CMYK?
OK, now byte order. Big or little endian? I say big, because I happen to
use Big-endian chips :)
Pixel compression, if any? Probably too hard to work with from scripts --
definitely to hard to modify -- so we'll have to leave it out.
Next, resolution. While 72ppi used to be a norm, it's not anymore.
Especially not for printing. We could just decide not to worry about this,
though.
Anyway, 512x342 card @ 32-bits/pixel = 684K. Let's not even think of nice,
big 640x480's (1200K) or 800x600's (1875K).
> But we should care about it. OK, in this case it'd probably be a feature
>that'd also be used by scripters in their stacks, so it should have an
>English-like name, but for debugging stuff etc, we should make sure they
>don't introduce unnecessary collisions with user syntax.
The interpreter can "export" it under whatever property name it wants.
<snip>
Undo message sounds like a good idea -- but what's wrong with catching the
domenu message?