On Feb 23, 2006, at 7:14 PM, Charles Yeomans wrote:
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, i'm still confused by all this... this is what i found in
quickdraw.h:
struct PixMap {
Ptr baseAddr; /*pointer to pixels*/
short rowBytes; /*offset to next line*/
Rect bounds; /*encloses bitmap*/
short pmVersion; /*pixMap version number*/
short packType; /*defines packing
format*/
long packSize; /*length of pixel data*/
Fixed hRes; /*horiz. resolution
(ppi)*/
Fixed vRes; /*vert. resolution
(ppi)*/
short pixelType; /*defines pixel type*/
short pixelSize; /*# bits in pixel*/
short cmpCount; /*# components in pixel*/
short cmpSize; /*# bits per component*/
#if OLDPIXMAPSTRUCT
long planeBytes; /*offset to next plane*/
CTabHandle pmTable; /*color map for this
pixMap*/
long pmReserved;
#else
OSType pixelFormat; /
*fourCharCode representation*/
CTabHandle pmTable; /
*color map for this pixMap*/
void* pmExt; /
*Handle to pixMap extension*/
#endif
};
first off, this is saying - contrary to the online docs - that
pixeltype is a short???? but look at these:
/* pixel formats*/
enum {
k1MonochromePixelFormat = 0x00000001, /* 1 bit indexed*/
k2IndexedPixelFormat = 0x00000002, /* 2 bit indexed*/
k4IndexedPixelFormat = 0x00000004, /* 4 bit indexed*/
k8IndexedPixelFormat = 0x00000008, /* 8 bit indexed*/
k16BE555PixelFormat = 0x00000010, /* 16 bit BE rgb 555
(Mac)*/
k24RGBPixelFormat = 0x00000018, /* 24 bit rgb */
k32ARGBPixelFormat = 0x00000020, /* 32 bit argb (Mac)*/
k1IndexedGrayPixelFormat = 0x00000021, /* 1 bit indexed gray*/
k2IndexedGrayPixelFormat = 0x00000022, /* 2 bit indexed gray*/
k4IndexedGrayPixelFormat = 0x00000024, /* 4 bit indexed gray*/
k8IndexedGrayPixelFormat = 0x00000028 /* 8 bit indexed gray*/
};
/* values for PixMap.pixelFormat*/
enum {
k16LE555PixelFormat = 'L555', /* 16 bit LE rgb 555 (PC)*/
k16LE5551PixelFormat = '5551', /* 16 bit LE rgb 5551*/
k16BE565PixelFormat = 'B565', /* 16 bit BE rgb 565*/
k16LE565PixelFormat = 'L565', /* 16 bit LE rgb 565*/
k24BGRPixelFormat = '24BG', /* 24 bit bgr */
k32BGRAPixelFormat = 'BGRA', /* 32 bit bgra (Matrox)*/
k32ABGRPixelFormat = 'ABGR', /* 32 bit abgr */
k32RGBAPixelFormat = 'RGBA', /* 32 bit rgba */
kYUVSPixelFormat = 'yuvs', /* YUV 4:2:2 byte ordering
16-unsigned = 'YUY2'*/
kYUVUPixelFormat = 'yuvu', /* YUV 4:2:2 byte ordering
16-signed*/
kYVU9PixelFormat = 'YVU9', /* YVU9 Planar 9*/
kYUV411PixelFormat = 'Y411', /* YUV 4:1:1 Interleaved
16*/
kYVYU422PixelFormat = 'YVYU', /* YVYU 4:2:2 byte
ordering 16*/
kUYVY422PixelFormat = 'UYVY', /* UYVY 4:2:2 byte
ordering 16*/
kYUV211PixelFormat = 'Y211', /* YUV 2:1:1 Packed 8*/
k2vuyPixelFormat = '2vuy' /* UYVY 4:2:2 byte
ordering 16*/
};
the ones specifically for .pixelformat are all defined as four char
codes!!!! and the pixel formats that are integers , none of them are
32... combine that with the fact that i get longs (or even shorts) at
38 of more like 15000.
i cant make heads or tails of this.
mike
--
Mike Woodworth
[EMAIL PROTECTED]
_______________________________________________
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>