Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (28 sloc) 1.449 kb
51b7d55 First commit.
Evan Miller authored
1 Notes on the circle_gif module
2 ---
3
4 To install, compile nginx with this ./configure option:
5
6 --add-module=path/to/this/directory
7
8 You must have the ImageMagick development headers for it to work.
9
10 The circle_gif module generates simple circle images with the colors and size
11 specified in the URL. The images are served quickly, much faster than if they
12 had been read from disk. The module was made to help web designers change the
13 colors of their "round corners" without having to fire up PhotoShop.
14
15 To enable the circles, add a "circle_gif;" directive to the location where you
16 want them. My nginx.conf has this:
17
18 location /circles {
19 circle_gif;
20 }
21
22 After that, the circles will be accessible like this:
23
24 /circles/<background color>/<foreground color>/<size>.gif
25
26 Background and foreground color are 24-bit hex colors, e.g. "ffffff" is white
27 and "000000" is black. Size is the radius of the circle in pixels. This
28 generates a black on white circle of radius 20:
29
30 /circles/ffffff/000000/20.gif
31
32 By default, only even-numbered radii between 10 and 20 are allowed. To change
33 this, you can use the directives "circle_min_radius" (default 10),
34 "circle_max_radius" (default 20), and "circle_step_radius" (default 2).
35 Note that an image for each radius is created at server startup and kept
36 in memory, so adding more circle sizes will slow server startup and use (a
37 very small amount of) RAM.
38
39 --Evan Miller
40 emmiller@gmail.com
Something went wrong with that request. Please try again.