-
Notifications
You must be signed in to change notification settings - Fork 22
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
[background image] Add dialog for background image #1789
Conversation
@justvanrossum I found a solution to make the color apply on a png. This is based on the idea to make every white pixel transparent. Reference: https://stackoverflow.com/questions/30438524/algorithm-to-make-image-white-and-transparent |
It doesn't work for me: I see the whole image as a solid rectangle in the selected color. |
This should be rebased on main somehow. |
7761721
to
dc21474
Compare
dc21474
to
f0ddab9
Compare
Does it work now? I made some changes. Search for |
@justvanrossum I am also wondering if we should wast our time with the color image issue. Would a user really use that kind of feature? I think the opacity feature is the more important one. |
It does work now. But I notice that this colorization is very binary: any grayscale values are gone. So that's definitely not desired. Let's for now not do colorization, and only provide the opacity slider. About having a global setting: maybe. Let's start with the individual opacity slider. (There may be better options with the Canvas filter property, but this isn't supported in Safari.) |
I have found the solution that doesn't involve pixel hacking. To properly support opacity, we unfortunately need to do the colorization into a temporary canvas. I got the colorization working efficiently (using caching) here: #1815. Will work on the color picker UI in the selection info panel. |
This is awesome. Thank you very much. |
Fixes #1787
Work in progress -> therefore draft PR.
I had to use the other branch as the base branch (not main), to have the selection code included.