Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.16.0
metadata
title: Drostescher
emoji: π¨
colorFrom: pink
colorTo: blue
sdk: gradio
sdk_version: 6.12.0
app_file: app.py
pinned: false
short_description: apply the Droste / logarithmic-spiral zoom effect
π Droste Effect
Upload any image (works best with logos or images that have a transparent background) and apply the Droste / logarithmic-spiral zoom effect.
Features
| Mode | Output |
|---|---|
| Still | Single warped frame (PNG) |
| Animation | Seamlessly looping GIF zoom |
Parameters
- Width / Height β output resolution
- Frames β number of animation frames (more = smoother, slower)
- Rotations per loop β how many full turns the spiral completes in one loop
- FPS β playback speed of the exported GIF
How it works
- Each pixel
(t, l)is mapped to normalised Cartesian space(y, x) β [-1,1]Β². - Polar coordinates
(r, a)are computed, thenlogr = logβ(r). - The angle modulates the log-radius:
logr -= na(turns circles into a spiral). logris folded into[-1, 0)so the image tiles seamlessly across octaves.- The inverse transform reconstructs pixel addresses, with transparent pixels resolved by stepping one octave inward until opaque colour is found.
The animation adds a time offset s β [0,1) to both logr and na, producing
a perfectly looping zoom-rotation.
Local usage
pip install gradio numpy numba Pillow
python app.py