Re: Cross-SDK CGImageCreate
Re: Cross-SDK CGImageCreate
- Subject: Re: Cross-SDK CGImageCreate
- From: "Kevin Meaney" <email@hidden>
- Date: Thu, 28 Sep 2006 13:53:49 +0100
- Organization: Softpress
On Oct 9, 2005, at 22:34, Eric Albert wrote:
>On Oct 8, 2005, at 3:02 PM, David Dunham wrote:
>
>> If I want my code to run on Intel, I need to use
>> kCGBitmapByteOrder32Host. This constant doesn't exist prior to 10.4,
>> and I need to run on 10.2. So my first thought was simply to define it.
>> But that doesn't work, since the argument of CGImageCreate has changed
>> in 10.4 -- > it used to be CGImageAlphaInfo, and is now
>> CGBitmapInfo.
>
>Both CGImageAlphaInfo and CGBitmapInfo are 32-bit values (at least as
>far as the calling convention is concerned), so I'm a bit confused as to
>how the change is causing any trouble here. Can you explain that a bit?
>
>Clearly it's runtime-compatible. But CodeWarrior at least considers them
>different types and complains. (I can't use Xcode for this because of
>some [filed] bugs, though the header file is different no matter what
>IDE I'd use.)
>
>I don't doubt you that CodeWarrior's complaining here, but given that
>CodeWarrior can't build for Intel I'm a bit perplexed as to how you're
>hitting this.
>
>Regardless, one simple workaround would be to only use that constant
>under #if __LITTLE_ENDIAN__. That'll never be defined when building in
>CodeWarrior.
>
>-Eric
I have a similar problem related to the above. In Xcode if I leave our
function calls to CGBitmapContextCreate to take a CGImageAlphaInfo then
I get link errors when building our spotlight plugin, the link errors go
when the parameter type is CGBitmapInfo. When building our application
we don't get the link error if CGImageAlphaInfo is the parameter type
and the only relevant build setting that is different is Generate
Position Dependent Code.
Currently we are using Xcode to do the intel build of our application
and to build the intel and ppc for our spotlight plugin. We still use
Codewarrior to build our application for ppc, compiling on both 10.3 and 10.4.
Since Codewarrior gets used on both 10.3 and 10.4 it builds against the
10.3 and 10.4 headers. But when building on 10.3 the CGBitmapInfo type
is not defined and we get compile errors. I've been hunting around in
the header files to try and find a macro that specifies the frameworks
sdk version that I can check against so that CGBitmapInfo can be defined
when necessary. I have had no luck.
Searching the internet provided me only with the above post to xcode-users.
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden