add opacity to doc.image options#1709
Conversation
|
This change adds an opacity for the whole page. It is not specific for image. Can already be achieved with doc |
|
Sorry, I know it is not technically changing the image and simply layering an opacity layer over it, but I don't think it is doing it to the whole page? In my tests, I have used the png.js: Now, because of where we push that opacity operator on Please let me know if I'm wrong, I very well could be - but from my understanding, this shouldn't be covering the whole page, but just our image. |
|
I actually did not tested. I relied on doOpacity implementation that add the dictionary to page I will reevaluate |
Feature
What kind of change does this PR introduce?
This PR introduces an
opacityoption todoc.image()which reuses the existing_doOpacitymechanism (ExtGStatewithcaset to the opacity value).I think this would be helpful in order to control transparency of images on-the-fly, for example #837 wanted to add a watermark and one of the best options is to simply add an image directly on the page, but you would need the image with the alpha channel already set. With this, you could just have your watermark (e.g. could be your company's logo that you already use on your website) and chuck it into the middle of the page and make it transparent with ease.
Checklist: