Buggy code:
class ImageList { int [ ] pixbufs ; int width = - 1 ; int height = - 1 ; Image [ ] images ; public ImageList ( ) { } public int add ( Image image ) { int index = 0 ; while ( index < ( images . length ) ) { if ( ( images [ index ] ) != null ) { if ( images [ index ] . isDisposed ( ) ) { OS . g_object_unref ( pixbufs [ index ] ) ; images [ index ] = null ; pixbufs [ index ] = 0 ; } } if ( ( images [ index ] ) == null ) break ; index ++ ; } int [ ] w = new int [ 1 ] ; int [ ] h = new int [ 1 ] ; OS . gdk_drawable_get_size ( image . pixmap , w , h ) ; int colormap = OS . gdk_colormap_get_system ( ) ; int pixbuf ; boolean hasMask = ( image . mask ) != 0 ; if ( hasMask ) { pixbuf = OS . gdk_pixbuf_new ( GDK_COLORSPACE_RGB , true , 8 , w [ 0 ] , h [ 0 ] ) ; if ( pixbuf == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; OS . gdk_pixbuf_get_from_drawable ( pixbuf , image . pixmap , colormap , 0 , 0 , 0 , 0 , w [ 0 ] , h [ 0 ] ) ; int gdkMaskImagePtr = OS . gdk_drawable_get_image ( image . mask , 0 , 0 , w [ 0 ] , h [ 0 ] ) ; if ( gdkMaskImagePtr == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; int stride = OS . gdk_pixbuf_get_rowstride ( pixbuf ) ; int pixels = OS . gdk_pixbuf_get_pixels ( pixbuf ) ; byte [ ] line = new byte [ stride ] ; for ( int y = 0 ; y < ( h [ 0 ] ) ; y ++ ) { int offset = pixels + ( y * stride ) ; OS . memmove ( line , offset , stride ) ; for ( int x = 0 ; x < ( w [ 0 ] ) ; x ++ ) { if ( ( OS . gdk_image_get_pixel ( gdkMaskImagePtr , x , y ) ) == 0 ) { line [ ( ( x * 4 ) + 3 ) ] = 0 ; } } OS . memmove ( offset , line , stride ) ; } OS . g_object_unref ( gdkMaskImagePtr ) ; } else { ImageData data = image . getImageData ( ) ; boolean hasAlpha = ( data . getTransparencyType ( ) ) == ( SWT . TRANSPARENCY_ALPHA ) ; pixbuf = OS . gdk_pixbuf_new ( GDK_COLORSPACE_RGB , hasAlpha , 8 , w [ 0 ] , h [ 0 ] ) ; if ( pixbuf == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; OS . gdk_pixbuf_get_from_drawable ( pixbuf , image . pixmap , colormap , 0 , 0 , 0 , 0 , w [ 0 ] , h [ 0 ] ) ; if ( hasAlpha ) { byte [ ] alpha = data . alphaData ; int stride = OS . gdk_pixbuf_get_rowstride ( pixbuf ) ; int pixels = OS . gdk_pixbuf_get_pixels ( pixbuf ) ; byte [ ] line = new byte [ stride ] ; for ( int y = 0 ; y < ( h [ 0 ] ) ; y ++ ) { int offset = pixels + ( y * stride ) ; OS . memmove ( line , offset , stride ) ; for ( int x = 0 ; x < ( w [ 0 ] ) ; x ++ ) { <START_BUG> line [ ( ( x * 4 ) + 3 ) ] = alpha [ ( ( y * ( h [ 0 ] ) ) + x ) ] ; <END_BUG> } OS . memmove ( offset , line , stride ) ; } } } if ( ( ( width ) == ( - 1 ) ) || ( ( height ) == ( - 1 ) ) ) { width = w [ 0 ] ; height = h [ 0 ] ; } if ( ( ( w [ 0 ] ) != ( width ) ) || ( ( h [ 0 ] ) != ( height ) ) ) { int scaledPixbuf = OS . gdk_pixbuf_scale_simple ( pixbuf , width , height , GDK_INTERP_BILINEAR ) ; OS . g_object_unref ( pixbuf ) ; pixbuf = scaledPixbuf ; } if ( index == ( images . length ) ) { Image [ ] newImages = new Image [ ( images . length ) + 4 ] ; System . arraycopy ( images , 0 , newImages , 0 , images . length ) ; images = newImages ; int [ ] newPixbufs = new int [ ( pixbufs . length ) + 4 ] ; System . arraycopy ( pixbufs , 0 , newPixbufs , 0 , pixbufs . length ) ; pixbufs = newPixbufs ; } pixbufs [ index ] = pixbuf ; images [ index ] = image ; return index ; } public void dispose ( ) { } public Image get ( int index ) { } int getPixbuf ( int index ) { } public int indexOf ( Image image ) { } int indexOf ( int pixbuf ) { } public boolean isDisposed ( ) { } public void remove ( Image image ) { } public int size ( ) { } }

Fix:
line [ ( ( x * 4 ) + 3 ) ] = alpha [ ( ( y * ( w [ 0 ] ) ) + x ) ] ;