On 6/6/06, Jerry <
email@hidden>
wrote:On 5 Jun 2006, at 17:38, Jeff Szuhay wrote:
> On Jun 5, 2006, at 12:27 PM, David Cairns wrote:
>> I'm currently still using GWorlds and Rects, which Xcode warns me
>> have
>> become deprecated.
>
> Look for QTNewGWorld and/or QTGWorldFromPixMap. These are the non-
> deprecated
> calls for what you need.
But once you have one of these, there's no non-deprecated way to
dispose of it :-(
Jerry
If you look at my code, I already use QTNewGWorld (QTNewGWorldFromPtr was giving me annoying results, so I just scrapped it – and
yes, i did allocate a buffer for it beforehand).
The problem is that we apparently have two options in accessing the pixel data in a GWorld directly:
QTNewGWorld + GetGWorldPixMap + LockPixels
or
QTNewGWorldFromPtr
I chose the first, but LockPixels was deprecated in 10.4. As I understand it, GWorlds et al are on their way out, and I know there must be some kind of alternative (like Core Image), but none of them allow *direct access to pixel data*, which I kind of need (as far as i can tell).
it's possible that i'm completely wrong about Core Image. if i am, let me know; i'd love to update this sample code again and make it "actually current" in regard to Apple's APIs.
:^)
-- David Cairns
Pennsylvania State University