thumbor / thumbor

thumbor is an open-source photo thumbnail service by globo.com

Home Page:http://thumbor.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken svg watermark position

OndrejIT opened this issue · comments

Hi, this "fix" a5c8e0c broke the behavior of the watermark filter when I pass svg to it.
To calculate the size of the svg it counts the size of the original svg, but this PR makes the svg the same size as the desired final photo size, this breaks the positioning of some watermarks that have different aspect ratio. Unfortunately, after a day of research I haven't thought of a better fix yet than monkey patching the convert_svg_to_png method in the watermark. Any ideas? Thank you.

Thumbor request URL

/1280x720/filters:watermark(https://www.svgrepo.com/show/4733/samples.svg,-30,-20,0,20)/https://nikonrumors.com/wp-content/uploads/2014/03/Nikon-1-V3-sample-photo.jpg

Thumbor 7.7.3:
image

Thumbor 7.4.6
image

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, or this issue will be closed in 15 days. You can always re-open if you still feel this is still an issue. Tag @heynemann for more information.

This issue was closed because it has been stale for 15 days with no activity.