Bug 574669

Summary: Program.getImageData sets wrong transparency mask
Product: [Eclipse Project] Platform Reporter: Jens Scharmann <trisher>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Demo with normal image, overlay image and corrected overlay image
none
demo overlay icon none

Description Jens Scharmann CLA 2021-07-06 02:48:27 EDT
Created attachment 286734 [details]
Demo with normal image, overlay image and corrected overlay image

In our RCP program we want to show images for files with an overlay icon. The image for the file is queried from the OS by Program.findProgram().getImageData(). The overlay icon is a .png file which is combined with the base image by an DecorationOverlayIcon (JFace). 
The combined image has black pixel for every pixel of which should be fully transparent. This seems to be due to the fully set maskData-property which is 1 for every pixel. If I correct it to be only one for pixels with an ARGB value != 0 the overlayed image looks as expected.
This seems to be a bug in Program.getImageData() and/or in the DecorationOverlayIcon. Demo program is attached.
Comment 1 Jens Scharmann CLA 2021-07-06 02:49:28 EDT
Created attachment 286735 [details]
demo overlay icon
Comment 2 Jens Scharmann CLA 2021-07-06 02:55:48 EDT
Note: The connected default program was Chrome or Firefox, both images hat the same issue.