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

[FEATURE] Ability to set masks for creator Image #180

Open
gunnsth opened this issue Oct 4, 2019 · 1 comment
Open

[FEATURE] Ability to set masks for creator Image #180

gunnsth opened this issue Oct 4, 2019 · 1 comment
Labels

Comments

@gunnsth
Copy link
Contributor

gunnsth commented Oct 4, 2019

Is your feature request related to a problem? Please describe.
For layering images, masks are necessary.

Describe the solution you'd like
It should be possible to set a mask for an Image which would basically set the a mask (either a hard/stencil or a soft mask) for that image.

The mask is a matrix of the same dimensions as the image and determined which pixels are actually used when layering.

Hard masks (stencil masks) are binary, whereas soft masks (alpha transparency) can be multi level.

Describe alternatives you've considered
This is currently not supported.

There are a few different options for masking discussed in PDF32000_2008 section 8.9.6 (Masked Images) that would be worth investigating further prior to implementation.

  • Stencil mask is a binary mask (transparent/opaque).
  • Specific colors can be masked out
  • SMask is basically an alpha layer

Implementing the SMask might make sense as it is the most flexible although the stencil masks will take less space. It would also be possible to detect if a provided mask uses only 2 levels and then store it as a stencil mask.

Additional context
Currently when an image is loaded the alpha data is stored. Would make sense to revisit how this is done.

@gunnsth
Copy link
Contributor Author

gunnsth commented Mar 31, 2020

Related #286 fixes multiple transparency issues. But still useful to be able to set masks.

@gunnsth gunnsth added feature New feature creator labels Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant