Applies the Droste effect transformation to an image.
The Droste effect is a kind of recursive image, first known to appear in M.C. Escher's Print Gallery.
The mathematical description of the Droste effect was not discovered until 2003, by a group of mathematicians at Leiden University, led by Prof. Hendrik Lenstra. The following web page describes how the effect is applied:
droste doesn't have a real build system at the moment, only a shell script that invokes the compiler. To build, you must have sh and gcc on your path, then:
$ ./build.sh
$ ./droste image.bmp [--eog] [--logpolar]
--eog
executeseog
(Eye of Gnome) after the image has been created--logpolar
creates a partially-transformed image. These options may also be used:--logpolar-rotate
--logpolar-repeat
--logpolar-rotate-repeat
By default, droste will perform the full Droste effect transformation. If the
input image is image.bmp
, droste will write the output to image-droste.bmp
.
droste supports 24-bit and 32-bit bitmap images. 32-bit bitmaps sort of work, but colors in the output are all wrong. 24-bit is recommended.
The centre pixel defines the color of the transparent area of the image.
Start off with your original image:
To perform the transformation, a portion of the image needs to be marked as 'transparent'. Fill out an area with a single color (one not used elsewhere in the image) like below, and save the image as a 24-bit bitmap. It works best if the transparent area is small in comparison to the whole image.
droste will first transform the image into log-polar coordinates:
It will then repeat the image horizontally and rotate it slightly:
Finally, the image is transformed back into cartesian coordinates, and the Droste transformation is complete: