-
Notifications
You must be signed in to change notification settings - Fork 69
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
Feature request: Mask union #76
Comments
Yes, the |
Another useful operation would be to multiply all pixels in an alpha mask by a fraction. |
Can you explain the use case? And it would be easier to implement on your side via |
The use case would involve merging consecutive layers that have the same color but different opacity, so that the layers can be masks rather than pixmaps until they've been combined. Also, would SIMD help at all in stacking two masks where one has the same alpha for the whole image? I'd use this to make stained-glass window textures (where the background is the same color as the frame but 75% transparent). |
And is there any chance that once |
Will take a look.
You mean something like The current |
I have an app where I load layers from SVGs, repaint them various colors, stack them, and output the results as PNGs. To minimize the memory consumed by intermediate results, I always union together masks that are being painted the same color for the same output PNG, unless I need to avoid doing so for Z-order reasons. Thus, being able to take the union of two masks via a tiny-skia routine rather than a loop I had to write myself, would be very useful.
As well, I could get by with fewer SVGs given subtraction and XOR operations on masks.
The text was updated successfully, but these errors were encountered: