On 2016-01-02 16:50 (+0100), Ben Thurston wrote:
I developed this math and wrote a python program to do this sort of mapping, I thought maybe it would be interesting to have in inkscape: http://benpaulthurstonblog.blogspot.com/2015/12/parameterized-quadratic-conf...
Out of curiosity, I implemeted the python program as Inkscape extension to apply such a transformation to a linked or embedded bitmap image (using the path data of a helper path for the parameters of the transformation) [1].
Comparing the results (python 2.7.11, Pillow 3.0) with your example in the blog entry of the tranformed Mona Lisa image, I wonder how you filled missing pixels in the output image?
Simple demo produced with Inkscape 0.91 and custom extension: http://imgh.us/qpconf-demo-091.svg
Regards, V
[1] Extension sources (includes a shared module): http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/files/head:/mo... INX file: http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/view/head:/mod... Python script: http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/view/head:/mod... TODO: reorder the points of the helper path (to ease user input), support parsing bezier curve segements (inserting a node at mid-length of each segment of a quadrilateral path).