<https://forums.getpaint.net/topic/17805-tool-plugins/#comment-306131>
<http://schema.org/text>
"I could implement it. \nIt's a pretty simple technique actually. \nPretty impressive if you consider the complexity/quality ratio. \nUsing a fourrier transform, you get the phase/magnitude of the prototype window (blue mask) and of the repair window \nYou keep the phase of your repair windows as is, and for magnitude you take the min of prototype and repair windows. \nThen you do the inverse transform to go back to spatial domain. \nAnd you keep the new pixel values only where your black mask is. \nAnd then you start again. \nProgressively, the texture replaces the black mask. \nThe papers are here: \nhttp://citeseerx.ist.psu.edu/viewdoc/su ... .1.56.3169 \nhttp://citeseerx.ist.psu.edu/viewdoc/su ... .1.53.5591 \nDon't let the wording fool you. They talk about projection onto convex sets, but it's really just intellectual masturbation... \nFor the the fourrier transforms there are libs. \nThis one looks nice: http://www.fftw.org/ "
<https://forums.getpaint.net/topic/17805-tool-plugins/?tab=comments#comment-306400>