I believe I discovered a bug in ImageMagick's polynomial distort function. Here is what I do:
Code: Select all
convert input.png -matte -virtual-pixel transparent -distort Polynomial "3 0,0 893,1523 826,0 1218,1523 1653,0 1543,1523 2480,0 1866,1523 0,582 848,1751 826,582 1200,1751 1653,582 1520,1751 2480,582 1811,1751 0,1164 793,1917 826,1164 1152,1917 1653,1164 1474,1917 2480,1164 1765,1917 0,1747 744,2059 826,1747 1076,2059 1653,1747 1425,2059 2480,1747 1730,2059" output.png
output.png: https://pasteboard.co/IwKZ4rI.png
But the output contains two times the input image, one with the correct coordinates (on the bottom) and the other does not (on the top). If I somehow change the points then it happens that the wrong image on the top disappears.
What goes wrong here?
Code: Select all
convert -v
Version: ImageMagick 6.9.10-62 Q16 x86 2019-08-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib
Regards,
Michael