From: | Martyn Capewell |
Date: | 10 Aug 99 at 18:16:23 |
Subject: | Re: Point() |
From: Martyn Capewell <martyn@jubileeweb.freeserve.co.uk>
Hello Mike
On 08-Aug-99, you wrote:
> From: Mike Carter <mike.carter@bigfoot.com>
>
> Hi all!
>
> Trying to knock out a point command (as found in Basic)
> tonight.
>
> The requirement of the command is to take an X,Y
> co-ords and bitmap pointer and return the colour value at a given
> position. Thing is this has gotta work with GFX cards
> (P96 / CGX) and AGA. The choice for bitmap storing was
> GUIGFX.library using the LoadPicture() command.
Is the image stored as a Bitmap or a Picture, as returned by LoadPicture()?
If it's a Picture, you could make sure it's in a known byte format, using
DoPictureMethod(picture,PICMTHD_RENDER,PIXFMT_0RGB_32);
Then get a pointer to that data using:
GetPictureAttrs(picture,PICATTR_RawData,&address);
Then examine the pixel data directly.
Regards