[futurebasic] Re: [FB] strange results from CGBitmapContextCreate [was malloc size question]

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2007 : Group Archive : Group : All Groups

From: Joe Lertola <joefb@...>
Date: Thu, 20 Dec 2007 10:28:11 -0500
I think I have the byte order problem figured out. I can just test for  
the byte order type when the program starts. This seems to work for  
both FB and FBtoC:


begin globals
dim as long kCGBitmapByteOrder16Host, kCGBitmapByteOrder32Host
end globals

local fn setByteOrderConstants
'detect if testOrder is in big or little end byte order format
dim as int testOrder
Poke @testOrder, 0
Poke @testOrder + 1, 1
long if testOrder = 1'testOrder is 1 if big end and 256 if little end
kCGBitmapByteOrder16Host = _kCGBitmapByteOrder16Big
kCGBitmapByteOrder32Host = _kCGBitmapByteOrder32Big
xelse
kCGBitmapByteOrder16Host = _kCGBitmapByteOrder16Little
kCGBitmapByteOrder32Host = _kCGBitmapByteOrder32Little
end if

end fn

-Joe