-
Notifications
You must be signed in to change notification settings - Fork 140
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
Creating a Watermark #65
Comments
Here is a sample of code for watermarking. I don't know why there is no 'Add' composite in scrimage, but you can add it easily:
|
By the way main image is jpeg and the watermark is png. Just letting you know so that that is not the problem, hopefully. |
I wasn't able to reproduce your result, but here is how I got mine:
Which composite and alpha parameter did you choose ? |
This is how I use it and I defined AddComposite same as here. |
Really weird ... Is their any other operation that you apply to your Indeed |
A resizing operation is applied before the composite function is called but that should not matter |
I fixed it. The watermark image is resized as well. When the resize function returns an image, it covers the background with white background. However the watermark png has a transparent background. Is there a way to avoid having a white background while using resize function ? Additionally, does the watermark image has to be transparent ? What if I want to make it completely opaque ? (This means that I just want to put one image on top of the other) |
Ok perfect this looks like it is working. So the only difference between scaleTo and resize is basically the background handling ? |
In resizeTo i was able to indicate a Position for the image, how can I do the same thing by using scaleTo ? |
The readme provides a bit of information about this.
|
I am trying to put watermarks on the images. I have tried half of the composite types but could not get the result I wanted. Composite combines the images but both images just appear faded or one just becomes completely dominated by the other and only a single image is visible. Is there an alternative for watermarks ? I found Watermarks.scala in the repository but could not make any sense out of it or use it.
The text was updated successfully, but these errors were encountered: