Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upside-down image in macOS Sonoma #860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sratz
Copy link
Member

@sratz sratz commented Nov 6, 2023

Image flipping was originally implemented back in 2008 [1,2]. Possibly as a workaround.

It appears something has changed with macOS Sonoma (14.0), and this is no longer necessary.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=254797
[2] ca92157

Resolves #772.

Image flipping was originally implemented back in 2008 [1,2]. Possibly
as a workaround.

It appears something has changed with macOS Sonoma (14.0), and this is
no longer necessary.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=254797
[2] ca92157

Resolves #772.
Copy link
Contributor

github-actions bot commented Nov 6, 2023

Test Results

     299 files  ±0       299 suites  ±0   6m 3s ⏱️ +39s
  4 095 tests ±0    4 087 ✔️ ±0    8 💤 ±0  0 ±0 
12 197 runs  ±0  12 124 ✔️ ±0  73 💤 ±0  0 ±0 

Results for commit 1572b37. ± Comparison against base commit 030807a.

@Phillipus
Copy link
Contributor

Phillipus commented Nov 6, 2023

Hi I tested this with the Snippets. It only fixes the case where a GC is used:

#772 (comment) and #772 (comment)

These are still upside down:

#772 (comment) and #772 (comment)

@Phillipus
Copy link
Contributor

@sratz I found a clue here:

ImageData.blit(
imageData.data, imageData.depth, imageData.bytesPerLine, imageData.getByteOrder(), imageData.width, imageData.height, palette.redMask, palette.greenMask, palette.blueMask,
buffer, 32, bpr, ImageData.MSB_FIRST, imageData.width, imageData.height, 0xFF0000, 0xFF00, 0xFF,
false, false);

by changing the last parameter flipY to true the image is correct.

@Phillipus
Copy link
Contributor

Phillipus commented Nov 6, 2023

@sratz I found a clue here:

Please ignore last comment. In testing in a real world app this causes a regression and images are upside-down elsewhere.

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.

[macOS Sonoma] Control.setBackgroundImage - image is upside down and flipped
2 participants