[comp.sys.amiga] Two Image Questions

bartonr@psu-cs.cs.pdx.edu (=> robart <=) (06/06/89)

  Two questions about Images:

1)  The comments in the Intuition include file say that to produce an image
which uses colors 2 and 3 you should put all ones in plane 0, put the image
data in plane 1, and put all zeroes in the remaining planes.  Since this will
produce 000x1 (binary, where x is either 0 or 1 depending on the image data)
wouldn't this give you colors 1 and 3 rather than 2 and 3?

2)  What exactly does Image.Depth refer to?  Is it the number of planes
represented by Image.ImageData, or the number of "picked" planes plus the
number of "on" planes?

tlm@pur-phy (Timothy Lee Meisenheimer) (06/08/89)

In article <1342@psueea.UUCP> bartonr@psu-cs.cs.pdx.edu (=> robart <=) writes:
>
>2)  What exactly does Image.Depth refer to?  Is it the number of planes
>represented by Image.ImageData, or the number of "picked" planes plus the
>number of "on" planes?

The number of bit planes in Image.ImageData! Image.PlanePick and 
Image.PlaneOnOff do the rest of the magic. On a similar vain, what if you want
to use an image that is wider than 32 bits? What are work arounds which other
have used? Is the simplest way to use two images? What is the limit on the
length on an image? What if I want to make an image for a gadget that is wider
than 32 bits? Say something like 60 pxls wide? There's no info in any of the
books that I have access to (RKM's, Peck and Mortimer). Anybody have some good
ideas or example programs? I'll redirect to .tech.

tlm@newton.physics.purdue.edu

rap@ez.ardent.com (Rob Peck) (06/09/89)

In article <2303@pur-phy> tlm@newton.physics.purdue.edu.UUCP (Timothy Lee Meisenheimer) writes:
>
>have used? Is the simplest way to use two images? What is the limit on the
>length on an image? What if I want to make an image for a gadget that is wider
>than 32 bits? Say something like 60 pxls wide? There's no info in any of the
>books that I have access to (RKM's, Peck and Mortimer). Anybody have some good
>ideas or example programs? I'll redirect to .tech.



Gadgets and Bob images can be of any width you wish.  My Programmer's Guide
used a 16-bit wide image for the Bob example deliberately, only to make it
possible to see exactly how the data was laid out in memory as compared
to that for a VSprite.  If you want to test it out, just copy the data
for the Bob several times, side by side, and specify the width of the result.
You'd get S!S!S!S!S!,,,, whatever wide, moving just fine.

Rob Peck.