Skip to main content

Repeating Watermarked Text

Comments

3 comments

  • Erwin Lukas

    Hi Alinea,

    It is possible to achieve this with a single URL, albeit a little bit long.

    Here's the URL: https://res.cloudinary.com/eyalkatzt/image/upload/$w_w,$h_h/l_1px,w_$w_mul_2,h_$h_mul_2/l_text:arial_40:INTERNAL%20USE%20ONLY,h_100,w_100,c_pad/h_h,w_w_mul_1.2,c_pad/fl_layer_apply.tiled/fl_layer_apply,a_-45/c_crop,w_$w,h_$h/sample.jpg

    Below is the transformation breakdown:

    To simplify what the above transformation is doing, it creates a layer as a canvas double the size of the original (for later purpose to fill the gap due to rotation), and inside that layer, we can apply the text overlay and tiled it. Tiling allows you to repeat the text within that bounding box. Once that's done, rotates that tile 45 degree angle. And re-crop to original image.

    Let me know if there is any question on this.

    Regards,
    Erwin Lukas

    0
  • Alinea Interactive

    Thats impressive! It will take me a while to try and understand it - but the text needs to overlay the previous text line to get the desired effect:

    Image 1: Text overlay

    This is because the watermarked text will be dynamic and may be longer e.g. "FOR INTERNAL USE ONLY NOT LEGALLY BINDING ETC ETC ETC" which will result in fewer text tiles unless they can be overlaid over each other.

    I had considered rendering the text to an image and then tiling that in multiple layers (as shown in the image below), but I could not find a way to offset the tiling

    Image 2: The heart is transformed by x -0.5 before it is tiled

    I posted this question here: https://support.cloudinary.com/hc/en-us/community/posts/360010511100-x-y-offset-for-tiling

     

    0
  • Erwin Lukas

    Hi Alinea,

    I believe Mo has provided you a solution on that thread. We can continue on that post if you have any follow-up questions with that approach.

    However, if you would like to pursue with the text overlay approach, let me know and I'll be happy to assist you.

    Regards,
    Erwin Lukas

    0

Post is closed for comments.