Buggy code:
public final class Image extends Resource implements Drawable { public int type ; public int handle ; public int data ; int transparentPixel = - 1 ; GC memGC ; byte [ ] alphaData ; int alpha = - 1 ; static final int DEFAULT_SCANLINE_PAD = 4 ; Image ( ) { } public Image ( Device device , int width , int height ) { } public Image ( Device device , Image srcImage , int flag ) { } public Image ( Device device , Rectangle bounds ) { } public Image ( Device device , ImageData data ) { } public Image ( Device device , ImageData source , ImageData mask ) { } public Image ( Device device , InputStream stream ) { } public Image ( Device device , String filename ) { } void createMask ( ) { } public void dispose ( ) { } public boolean equals ( Object object ) { } public Color getBackground ( ) { } public Rectangle getBounds ( ) { } public ImageData getImageData ( ) { } public static Image carbon_new ( Device device , int type , int handle , int data ) { } public int hashCode ( ) { } void init ( Device device , int width , int height ) { } void init ( Device device , ImageData image ) { if ( image == null ) SWT . error ( ERROR_NULL_ARGUMENT ) ; this . device = device ; int width = image . width ; int height = image . height ; PaletteData palette = image . palette ; if ( ! ( ( ( ( ( ( ( image . depth ) == 1 ) || ( ( image . depth ) == 2 ) ) || ( ( image . depth ) == 4 ) ) || ( ( image . depth ) == 8 ) ) && ( ! ( palette . isDirect ) ) ) || ( ( ( image . depth ) == 8 ) || ( ( ( ( ( image . depth ) == 16 ) || ( ( image . depth ) == 24 ) ) || ( ( image . depth ) == 32 ) ) && ( palette . isDirect ) ) ) ) ) SWT . error ( ERROR_UNSUPPORTED_DEPTH ) ; int dataSize = ( width * height ) * 4 ; data = OS . NewPtr ( dataSize ) ; if ( ( data ) == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; int provider = OS . CGDataProviderCreateWithData ( 0 , data , dataSize , 0 ) ; if ( provider == 0 ) { OS . DisposePtr ( data ) ; SWT . error ( ERROR_NO_HANDLES ) ; } int colorspace = device . colorspace ; int transparency = image . getTransparencyType ( ) ; <START_BUG> int alphaInfo = ( ( transparency == ( SWT . TRANSPARENCY_NONE ) ) || ( ( image . alpha ) != ( - 1 ) ) ) ? OS . kCGImageAlphaNoneSkipFirst : OS . kCGImageAlphaFirst ; <END_BUG> handle = OS . CGImageCreate ( width , height , 8 , 32 , ( width * 4 ) , colorspace , alphaInfo , provider , null , true , 0 ) ; OS . CGDataProviderRelease ( provider ) ; if ( ( handle ) == 0 ) { OS . DisposePtr ( data ) ; SWT . error ( ERROR_NO_HANDLES ) ; } int bpr = width * 4 ; byte [ ] buffer = new byte [ dataSize ] ; if ( palette . isDirect ) { ImageData . blit ( BLIT_SRC , image . data , image . depth , image . bytesPerLine , image . getByteOrder ( ) , 0 , 0 , width , height , palette . redMask , palette . greenMask , palette . blueMask , ALPHA_OPAQUE , null , 0 , 0 , 0 , buffer , 32 , bpr , MSB_FIRST , 0 , 0 , width , height , 16711680 , 65280 , 255 , false , false ) ; } else { RGB [ ] rgbs = palette . getRGBs ( ) ; int length = rgbs . length ; byte [ ] srcReds = new byte [ length ] ; byte [ ] srcGreens = new byte [ length ] ; byte [ ] srcBlues = new byte [ length ] ; for ( int i = 0 ; i < ( rgbs . length ) ; i ++ ) { RGB rgb = rgbs [ i ] ; if ( rgb == null ) continue ; srcReds [ i ] = ( ( byte ) ( rgb . red ) ) ; srcGreens [ i ] = ( ( byte ) ( rgb . green ) ) ; srcBlues [ i ] = ( ( byte ) ( rgb . blue ) ) ; } ImageData . blit ( BLIT_SRC , image . data , image . depth , image . bytesPerLine , image . getByteOrder ( ) , 0 , 0 , width , height , srcReds , srcGreens , srcBlues , ALPHA_OPAQUE , null , 0 , 0 , 0 , buffer , 32 , bpr , MSB_FIRST , 0 , 0 , width , height , 16711680 , 65280 , 255 , false , false ) ; } if ( ( transparency == ( SWT . TRANSPARENCY_MASK ) ) || ( ( image . transparentPixel ) != ( - 1 ) ) ) { this . type = ( ( image . transparentPixel ) != ( - 1 ) ) ? SWT . BITMAP : SWT . ICON ; if ( ( image . transparentPixel ) != ( - 1 ) ) { int transRed = 0 ; int transGreen = 0 ; int transBlue = 0 ;

Fix:
int alphaInfo = ( ( transparency == ( SWT . TRANSPARENCY_NONE ) ) && ( ( image . alpha ) == ( - 1 ) ) ) ? OS . kCGImageAlphaNoneSkipFirst : OS . kCGImageAlphaFirst ;