Community
Participate
Working Groups
Creating new image via transparencyMask not working as expected. Replace following lines with loading image directly from source input works as before. Image loadImage(Display display, String fileName) { Image image = null; try (InputStream sourceStream = getClass().getResourceAsStream(fileName + ".ico")) { //$NON-NLS-1$ image = new Image(display, sourceStream); // ImageData source = new ImageData(sourceStream); // ImageData mask = source.getTransparencyMask(); // image = new Image(display, source, mask); } catch (IOException e) { showError(getResourceString("Error"), e.getMessage()); //$NON-NLS-1$ } return image;
New Gerrit change created: https://git.eclipse.org/r/139987
Is this related to bug 345962? 4.10 as version is also correct? Can you attach a screen shot of the problem?
(In reply to Andrey Loskutov from comment #2) > Is this related to bug 345962? I meant bug 345972.
Gerrit change https://git.eclipse.org/r/139987 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=2dfa77fb07779dbb9c647dc96a4c6628321df4a3
(In reply to Andrey Loskutov from comment #3) > (In reply to Andrey Loskutov from comment #2) > > Is this related to bug 345962? > > I meant bug 345972. Sort of, the issue with bug 345972 is due to transparencyMask not handled correctly for areas of image where pixels are suppose to be transparent. There is a similar issue here where loading images natively does not build maskData, and builds an alphaData instead to account for transparency. (i.e. transparencyType is TRANSPARENCY_ALPHA instead of TRANSPARENCY_MASK). So the images are not being displayed correctly, areas are black where it is suppose to be transparent.
Created attachment 278143 [details] texteditorbad.png
(In reply to Andrey Loskutov from comment #2) > Is this related to bug 345962? 4.10 as version is also correct? Can you > attach a screen shot of the problem? Screenshot of problem attached in comment 6.
(In reply to Xi Yan from comment #6) > Created attachment 278143 [details] > texteditorbad.png Is this an example SWT based editor? In which repo is it?
(In reply to Andrey Loskutov from comment #8) > (In reply to Xi Yan from comment #6) > > Created attachment 278143 [details] > > texteditorbad.png > > Is this an example SWT based editor? In which repo is it? This is in examples, the same project as ControlExample.
Fixed for me with I20190403-1800. Xi, do you plan to provide more patches on this bug, or can we close it?
(In reply to Andrey Loskutov from comment #10) > Fixed for me with I20190403-1800. Xi, do you plan to provide more patches on > this bug, or can we close it? Thanks for verifying! We can close it.