if (srcBitsPerPixel == 32) {
if (false && srcBitsPerPixel == 32) {
public ImageData getImageData() {	if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	Rectangle srcBounds = getBounds();	int width = srcBounds.width;	int height = srcBounds.height;    int srcDepth= getDepth(pixmap);	/* Get the data for the source image. */    int srcRowBytes= rowBytes(width, srcDepth);    int srcBitsPerPixel= srcDepth;	byte[] srcData = new byte[srcRowBytes * height]; 	copyPixMapData(pixmap, srcData);	/* Build the palette */	PaletteData palette = null;	switch (srcDepth) {	case 1:		palette = new PaletteData(new RGB[] {			new RGB(0, 0, 0),			new RGB(255, 255, 255)		});		break;	case 4:		short[] colorTable4= getColorTable(pixmap);		RGB[] rgbs4 = new RGB[ colorTable4.length/4 ];		for (int i = 0; i < rgbs4.length; i++) {			int packed= getRGB(colorTable4, i);			rgbs4[i] = new RGB((packed >> 16) & 0xFF, (packed >> 8) & 0xFF, (packed >> 0) & 0xFF);		}		palette = new PaletteData(rgbs4);		break;	case 8:		/* Normalize the pixels in the source image data (by making the		 * pixel values sequential starting at pixel 0). Reserve normalized		 * pixel 0 so that it maps to real pixel 0. This assumes pixel 0 is		 * always used in the image.		 */		byte[] normPixel = new byte[ 256 ];		for (int index = 0; index < normPixel.length; index++) {			normPixel[ index ] = 0;		}		int numPixels = 1;		int index = 0;		for (int y = 0; y < height; y++) {			for (int x = 0; x < srcRowBytes; x++) {				int srcPixel = srcData[ index + x ] & 0xFF;				if (srcPixel != 0 && normPixel[ srcPixel ] == 0) {					normPixel[ srcPixel ] = (byte)numPixels++;				}				srcData[ index + x ] = normPixel[ srcPixel ];			}			index += srcRowBytes;		}				short[] colorTable= getColorTable(pixmap);		/* Create a palette with only the RGB values used in the image. */		RGB[] rgbs = new RGB[ numPixels ];		for (int srcPixel = 0; srcPixel < normPixel.length; srcPixel++) {			// If the pixel value was used in the image, get its RGB values.			if (srcPixel == 0 || normPixel[ srcPixel ] != 0) {				int packed= getRGB(colorTable, srcPixel);				int rgbIndex = normPixel[ srcPixel ] & 0xFF;				rgbs[ rgbIndex ] = new RGB((packed >> 16) & 0xFF, (packed >> 8) & 0xFF, (packed >> 0) & 0xFF);								}		}		palette = new PaletteData(rgbs);		break;	case 16:	case 24:	case 32:		palette = new PaletteData(getRedMask(srcDepth), getGreenMask(srcDepth), getBlueMask(srcDepth));		break;	default:		SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);	}			ImageData data = new ImageData(width, height, srcDepth, palette);	data.data = srcData;	if (srcBitsPerPixel == 32) {		/*		 * If bits per pixel is 32, scale the data down to 24, since we do not		 * support 32-bit images		 */		byte[] oldData = data.data;		int bytesPerLine = (width * srcDepth + 7) / 8;		bytesPerLine = (bytesPerLine + 3) / 4 * 4;		byte[] newData = new byte[bytesPerLine * height];		int destIndex = 0;		int srcIndex = 0;				for (int y = 0; y < height; y++) {			destIndex = y * bytesPerLine;			srcIndex = y * srcRowBytes;			for (int x = 0; x < width; x++) {				newData[destIndex] = oldData[srcIndex + 1];				newData[destIndex + 1] = oldData[srcIndex + 2];				newData[destIndex + 2] = oldData[srcIndex + 3];				srcIndex += 4;				destIndex += 3;			}		}		data.data = newData;	}	if (transparentPixel == -1 && type == SWT.ICON && mask != 0) {		/* Get the icon data */		data.maskPad = 4;		int maskRowBytes= rowBytes(width, getDepth(mask));		data.maskData = new byte[maskRowBytes * height];		copyPixMapData(mask, data.maskData);	}	data.transparentPixel = transparentPixel;	data.alpha = alpha;	if (alpha == -1 && alphaData != null) {		data.alphaData = new byte[alphaData.length];		System.arraycopy(alphaData, 0, data.alphaData, 0, alphaData.length);	}	return data;}