Note: The movement will allow you to see the seams where the images were joined, which distracts from the effect, so it's helpful to pause the video every so often.
I had written a Gimp plugin to search for the best way to cut up a source image so that it can be rotated 180 degrees and look identical.
It works by creating sub-images of the image the size of the current selection, and for every one of them, it calculates the lowest cost path from the center to the edge of the subimage. The cost of moving from one pixel to the next is calculated by applying the pythagorean theorem to the RGBA components of the image and its 180 degree rotation.
Once the lowest cost path is found, the selection is replaced by the subimage it belonged to, which is then cut along that path and combined with its 180 degree rotation.
There are two possible ways to combine the image, depending on which half of the image is discarded. The plugin tries to keep the half that contains the top-left pixel.
The video you see is the plugin being used on a very large collage of images I shamelessly stole from DeviantArt. It's panning through it and trying to turn the chunk it's currently looking at into a playing card image. The left image is of course the result, and the right image is the error map in red, the distance from the center in black/white, and the path in green/purple.
This plugin was created to help me make the card designs for a Solitare World of Warcraft Addon. When/if that Addon is released, the source code to this plugin will be released as part of that.
Thank you sooo much! I finaly made a deck of cards! THANK you man!!!
Undertakernd 1 year ago
@Undertakernd I don't see why you're thanking me for that.
smariot 1 year ago