From - Sat Jul  6 19:26:25 1996
Path: news.unizar.es!news.rediris.es!news.uoregon.edu!hunter.premier.net!news.mathworks.com!newsfeed.internetmci.com!in2.uu.net!nntp.crl.com!user
From: squires@crl.com (Scott Squires)
Newsgroups: comp.sys.mac.programmer.help
Subject: Re: Getting Alpha values from a pixmap
Date: Fri, 05 Jul 1996 14:04:50 -0800
Organization: Puffin Designs
Lines: 33
Distribution: world
Message-ID: <AE02D1829668F51C0@192.0.2.1>
References: <31DD6C48.41C6@daphne.cps.unizar.es>
NNTP-Posting-Host: crl9.crl.com

In article <31DD6C48.41C6@daphne.cps.unizar.es>,
"J.A. Gutierrez" <spd@daphne.cps.unizar.es> wrote:

>Hi
>
>
>You know, PICT2 pixmaps (OpCode 0x9A) allows storing RGBA pixels
>(actually, ARGB pixels)
>
>My question is: How do you retrieve the Alpha value from a
>PicHandle?
>
>
>Currently I DrawPicture to a NewGWorld; and then I use
>GetCPixel to get every (x,y) pixel RGB color; but I couldn't find
>any information about how to get the A value.
>
>

There are no QuickDraw routines for dealing with alpha values.
Apple basically ignores it (or changes it).
 
To get the alpha data you have to access the data in the GWorld
Pixmap directly.   GetPixBaseAddr and then step through the pixels,
increment rows by by RowBytes && 0x3fff .

-scott


Scott Squires               "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com