The current version of the text filter renders text very slowly and seems unmaintained (last edit in 2015).
The version in in this PR prerenders the text and only blends the relevant "stripe", speeding up the rendering. Also, text under baseline (like the tip of the letter 'j') is correctly rendered.
Regression checks
[x] Works with negative and huge offsets/sizes (-1 still sets default values, though, as does in current code)
[x] Positioning slightly deviates from master, but should be correct (caron of 'Ť' matches top of screen on y=0)
[x] Works with other filters (tried change_pixfmt + RGB/RGBA, resize)
[x] Checked for (introduced) mem leaks
Unresolved
This version performs the blend with ImageMagick (MagickCompositeImage), which is still slightly slow (still 2-10x faster than master). I don't know how to blend it manually.
Text color/outline/font are kept hardcoded to black/white/helvetica, as they are now.
Currently, the work is kept in my fork, ~100 line diff. Should I first create a branch in the CESNET repo and merge from there?
Please comment if there's anything odd or left to test.
Background
The current version of the text filter renders text very slowly and seems unmaintained (last edit in 2015).
The version in in this PR prerenders the text and only blends the relevant "stripe", speeding up the rendering. Also, text under baseline (like the tip of the letter 'j') is correctly rendered.
Regression checks
Unresolved
Currently, the work is kept in my fork, ~100 line diff. Should I first create a branch in the CESNET repo and merge from there?
Please comment if there's anything odd or left to test.