Skip to content

Conversation

@jonathan-meier
Copy link
Contributor

@jonathan-meier jonathan-meier commented Aug 10, 2022

Fixes #301.

@jonathan-meier jonathan-meier changed the title Issue #301: wrong transparency when drawing image (regression from PR #224) Issue #301 - wrong transparency when drawing image (regression from PR #224) Aug 10, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2022

Unit Test Results

     602 files       602 suites   12m 25s ⏱️
  4 016 tests   4 003 ✔️     5 💤   7  1 🔥
24 040 runs  23 884 ✔️ 134 💤 18  4 🔥

For more details on these failures and errors, see this check.

Results for commit dde8a36.

♻️ This comment has been updated with latest results.

…ata.data for icons

Fixes the regression introduced in PR eclipse-platform#244 (commit 8def011) which
also allowed alpha data in ImageData.data for bitmaps. Alpha data for bitmaps must be provided in
ImageData.alphaData. This ensures proper conversion of the image data to pre-multiplied alpha format
and aligns the behavior of Image initialization with the implementation for Linux.
… are always opaque

DDBs can have a 32 bit depth but the returned alpha channel data is always 0 which means fully
transparent. Since we want to avoid a costly blit operation from 32 to 24 bits, stripping the alpha
channel data, we set the alpha channel data to 255 for better compatibility. Note that alpha channel
data in ImageData.data should always be ignored anyway and be read from ImageData.alphaData instead.
@vogella
Copy link
Contributor

vogella commented Aug 10, 2022

@SyntevoAlex can you reiview and merge this one?

@SyntevoAlex
Copy link
Member

I could have a look, hopefully today or tomorrow.

Copy link
Member

@niraj-modi niraj-modi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch works as expected, tested with below snippet:
#301 (comment)

@niraj-modi niraj-modi merged commit 36091a0 into eclipse-platform:master Aug 11, 2022
@Phillipus
Copy link
Contributor

Thanks, everyone! 👍

@lshanmug lshanmug added this to the 4.25 M3 milestone Aug 17, 2022
@jonathan-meier jonathan-meier deleted the issue301 branch September 1, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression drawing image arising from fix to #185 and other regressions in Image class

6 participants