I have a collection of images which I use IIPImage to serve and display dynamic watermarks on.
Some images have white backgrounds or white sections in them and the watermarks seem to cut off against the white parts of the image. I have tested this with brightly coloured watermarks (specifically red), and where the watermark transitions from a coloured part of the image to any white part, the watermark is no longer visible.
I can privately message screenshots showing the issue, but I cannot post them publicly.
Server details are:
Ubuntu 14.04 LTS
Apache2.4.7.
IIPImage 1.0.1 installed from source.
Thanks in advance for any replies.
Last edit: Jacob Naylor 2016-11-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, yes, a white pixel in the image will remain white after adding the watermark. Maybe IIPImage should have the option of using multiplication instead of addition. I'll look into this, but in the meantime, I'm afraid you cannot watermark pure white pixels.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the fast response, Ruven, much appreciated.
Thank you for the confirmation regarding this issue. It would be good to see some functionality to allow this to happen in the future. Is there any kind of workaround at the moment that doesn't involve altering the source image?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Or you can change the watermark image to have a double border: outside white, and inside grey ( for example ). That way the border of the image is always surrounded
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem isn't that we can't see white on white, it's that the watermark physically doesn't appear on the white areas of the image. I tested this by using a bright red watermark, and where the image shifted from a colour to white, the watermark wasn't visible at all over the white background when the red sections should have been visible.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a collection of images which I use IIPImage to serve and display dynamic watermarks on.
Some images have white backgrounds or white sections in them and the watermarks seem to cut off against the white parts of the image. I have tested this with brightly coloured watermarks (specifically red), and where the watermark transitions from a coloured part of the image to any white part, the watermark is no longer visible.
I can privately message screenshots showing the issue, but I cannot post them publicly.
Server details are:
Ubuntu 14.04 LTS
Apache2.4.7.
IIPImage 1.0.1 installed from source.
Thanks in advance for any replies.
Last edit: Jacob Naylor 2016-11-25
The watermark is created by essentially adding the pixel values from the watermark to the image. You can see a more detailed explanation here: http://iipimage.sourceforge.net/documentation/images#watermarking
So, yes, a white pixel in the image will remain white after adding the watermark. Maybe IIPImage should have the option of using multiplication instead of addition. I'll look into this, but in the meantime, I'm afraid you cannot watermark pure white pixels.
Thanks for the fast response, Ruven, much appreciated.
Thank you for the confirmation regarding this issue. It would be good to see some functionality to allow this to happen in the future. Is there any kind of workaround at the moment that doesn't involve altering the source image?
Not really.
Or you can change the watermark image to have a double border: outside white, and inside grey ( for example ). That way the border of the image is always surrounded
The problem isn't that we can't see white on white, it's that the watermark physically doesn't appear on the white areas of the image. I tested this by using a bright red watermark, and where the image shifted from a colour to white, the watermark wasn't visible at all over the white background when the red sections should have been visible.