coobird / thumbnailator

Thumbnailator - a thumbnail generation library for Java
MIT License
5.08k stars 780 forks source link

Allow setting margins (insets) for watermarks #177

Open rider87 opened 2 years ago

rider87 commented 2 years ago

Hi all,

Is there a possibility to have margin for the watermark? Like you maybe know from Lightroom?

Please see this example... There is a space between bottom and left side... Is this also possible?

image

rider87 commented 2 years ago

I believe it´s just to adjust this code: image

Currently only one value is there... Can we do margin for

coobird commented 2 years ago

Are you asking whether it's possible to have top/bottom/left/right margins to be set independently? If that's the case, as you found in the code, right now that's not possible.

rider87 commented 2 years ago

yes, correct.... currently I can see to set only one value for all (top/bottom/left/right)...

Can this be implemented? I believe there needs just to add 3 addtional parameters to the function...

coobird commented 2 years ago

I'm hesitant to add yet another overload for the watermark method to the Thumbnailator API, especially one that has 7 arguments. That said, I'll keep this issue open as this sounds like a valid use case.