summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
index 897a8c00b4..c8268d6deb 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
@@ -1075,7 +1075,11 @@ void initNative(String filename) {
// We now have everything we neeed to construct an ImageData object and initialize everything from that.
ImageData data = new ImageData((int)/*64*/width, (int)/*64*/height, (int)/*64*/bpp, palette, 4, imageData);
data.bytesPerLine = (int)/*64*/bpr;
- if ((dataFormat & OS.NSAlphaFirstBitmapFormat) == 0) nativeTransparentColor <<= bps;
+
+ if (nativeTransparentColor != -1) {
+ if ((dataFormat & OS.NSAlphaFirstBitmapFormat) == 0) nativeTransparentColor <<= bps;
+ }
+
data.transparentPixel = nativeTransparentColor;
data.alpha = -1;
data.alphaData = nativeAlphaData;