Bug 574669 - Program.getImageData sets wrong transparency mask
Summary: Program.getImageData sets wrong transparency mask
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.18   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 02:48 EDT by Jens Scharmann CLA
Modified: 2021-07-06 02:55 EDT (History)
0 users

See Also:


Attachments
Demo with normal image, overlay image and corrected overlay image (3.31 KB, application/octet-stream)
2021-07-06 02:48 EDT, Jens Scharmann CLA
no flags Details
demo overlay icon (160 bytes, image/png)
2021-07-06 02:49 EDT, Jens Scharmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.