Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Will this work with Intel?



I have some code that I basically copied from the VideoProcessing MiniMung sample. The code goes through an off-screen GWorld and interrogates the pixel information. It looks like this:

    for (y = 0; y < bounds.bottom; ++y)
    {
        baseAddr = (UInt32*)(GetPixBaseAddr(pixPreview) + y * bpr);
        for (x = 0; x < bounds.right; x++)
        {
            // get the RGB of the color
            color = *baseAddr;
            R = (color & 0x00FF0000) >> 16;
            G = (color & 0x0000FF00) >> 8;
            B = (color & 0x000000FF) >> 0;

So my question is will this work on Intel? I only have a G4 PowerBook so I cannot test this out. But I am basically worried about the code that gets the R, G and B values. I'm thinking Endian issues.

The GWorld is created like this:

	QTNewGWorld(&(gpMonData->pGWorldPreview),
    			  k32ARGBPixelFormat,
    			  &inBounds,	
    			  0,
    			  NULL,	
    			  0);	

As you can see, I am using k32ARGBPixelFormat as the pixel format.

Many thanks for any information you can provide. I am indeed saving for an Intel machine!

Thanks

_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.