-
Notifications
You must be signed in to change notification settings - Fork 109
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
Could I configure the watermark of the image? #111
Comments
Did you mean to file this issue in asciidoctor-pdf? I'm not exactly clear where you want a watermark to be applied. Do you want it to be a background/foreground image on each PDF page or on the image generated by Asciidoctor Diagram?
That comment applies specifically to presentations. |
I want to add watermark on the images what are gernerated by Asciidoctor Diagram and/or linked on document. For example, my website is http://www.diguage.com/, I want to show the link on all the images in the document was generated by Asciidoctor. |
Asciidoctor Diagram primarily just invokes the different diagram generators. Therefore, the diagram generator itself would need to support this feature. If/when it does, then Asciidoctor Diagram could be sure to pass on the necessary information or configuration. |
@mojavelinux OK, I see. Thanks. Could Asciidoctor add watermark to the exist images what were referenced? |
The challenge is that adding a watermark is a very open-ended requirement. There are as many ways to add a watermark as their are designs in the world. We would either have to pick a style (placement, font family, font size, font color, etc) and use that, or we'd get into the realm of trying to design a configuration language for controlling it. However, what we could do is provide an API hook / extension point for post-processing / filtering the generated image. That would give an Asciidoctor Diagram user an opportunity to decorate the generated image however you saw fit. You could use something like rmagick to add a watermark. I think this is the best approach. wdyt? |
Using imagemagick to overlay text as a post processing step is how I would do it as well. Not sure how to provide an extension point in the diagram generators though. That would require an additional extension registration system. Would a dummy post process method that you could monkey patch be sufficient or is something more structured needed? |
I would image that Asciidoctor Diagram itself would expose an API to register a post processor or callback. I haven't thought much deeper than that about it. |
I want to add a watermark to the images.
I google it, then I found I can add watermark to the pdf document with pdf template. And I found @mojavelinux added a comment to twetter https://twitter.com/ysb33r/status/650976750327959552 : Don't do it. It's a floodmark, a tell-tell antipattern. There's your solution ;)
Could I configure the watermark of the image? Does Asciidoctor plan to support the feature?
The text was updated successfully, but these errors were encountered: