Feature request: adding watermark
Adding a dynamic watermark with a configurable position would be a great feature.
Could you specify a bit more precisely what you're after? A watermark in addition to the normal rendered text, or just text looking like watermark? Do you have examples images of what you mean?
I agree that we should have a watermark option since there are cases that someone will download and extract the texts without permission, just like MS Word. Anyway, I'm looking forward to seeing this function available.
Thanks. Can you provide an example of what sort of result you're after? An example image for instance.
Is it enough to specify an existing watermark image to render as an overlay on the produced image or should the watermark be added based on provided text?
Like this image, for example, and I think that it is possible to include the big red watermark text on texts.
Adding another text layer on top of the actual text should be fairly easily doable. I'm mostly concerned about the complexity regarding the positioning of the watermark (rotation, size, etc), if it's to be done automatically. And that this would fall outside of the concern of this library.
And besides, I still don't really understand the use case for a watermark on text. @khangahs you mentioned
there are cases that someone will download and extract the texts without permission, just like MS Word
but I don't understand what you mean. The text is in an image, so are you afraid that someone will use some kind of OCR software to extract the text from the image and use it without permission? How does that differ from just typing the text manually into a different document?
I can understand watermarks on images, since they're hard to recreate, but text? Please enlighten me so I can understand why this would be needed 🙏
Generally I think watermarking falls outside of the scope of this library, there are other libs that do watermarking on any image, for example https://www.npmjs.com/package/purejswatermark.
Sorry for the late response! You're right @bostrom. However, since I see that the project can implement such a feature, the suggestion poses only an idea. Sometimes, users write texts and want to convert them to images. Thus, if we can implement a watermark during the process, it will be much simplier rather than install a second library.
Thanks @khangahs, for now I think you're better off with another library for watermarking. However, if the development of this library at some point goes in the direction of supporting multiple text layers, then this watermarking could be a byproduct of that. In the meantime we can keep this open as a reminder.