On Feb 24, 2006, at 12:25 PM, Mike Woodworth wrote:
On Feb 23, 2006, at 7:14 PM, Charles Yeomans wrote:
On Feb 23, 2006, at 4:25 PM, Mike Woodworth wrote:
still im getting gibberish for the pixeltype. i was hoping to see
this work before i start digging around in the baseaddr more, but
i'm starting to wonder if RB isnt properly setting it?
I don't think the problem is with Rb. First, GetGWorldPixMap returns
a PixMapHandle. So to get at the PixMap, you need to perform an
additional dereference.
dim pixmapHandle as MemoryBlock = GetGWorldPixMap(cgrafptr)
dim pixMapPointer as MemoryBlock = pixmapHandle.Ptr(0)
Now, the pixelFormat field is indeed at offset 38; inspection reveals
its integer value (for a JPEG file I opened) to be 32. That
certainly does not look like a FourCharCode, and in fact it's not.
To figure out what it means, you turn to the header file QuickDraw.h,
from which we learn that some basic pixel formats are represented not
as FourCharCodes, but as integers. Here, 32 = k32ARGBPixelFormat. I
assume that this is a standard Mac format.
charles... you're great. so in fact i was getting the 32 as well... i
just don't trust my declare skills enough to assume i've done things
right and the documentation is wrong.
The documentation is not wrong, just incomplete. When in doubt, the
header files are the most reliable documentation for the MacOS APIs.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>