Menu

Dynamic Watermarks Don't Appear on White Background

Help
2016-11-25
2016-11-25
  • Jacob Naylor

    Jacob Naylor - 2016-11-25

    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
  • Ruven

    Ruven - 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.

     
  • Jacob Naylor

    Jacob Naylor - 2016-11-25

    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?

     
    • Ruven

      Ruven - 2016-11-25

      Is there any kind of workaround at the moment that doesn't involve altering the source image?

      Not really.

       
  • njfranck

    njfranck - 2016-11-25

    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

     
    • Jacob Naylor

      Jacob Naylor - 2016-11-25

      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.

       

Anonymous
Anonymous

Add attachments
Cancel