Accept cookies for analytics, social media, and advertising, or learn more and adjust your preferences. These cookies are on by default for visitors outside the UK and EEA. Privacy Notice.
ngx_http_circle_gif_module - Generates simple circle images with the colors and size specified in the URL. The images are served quickly, much faster than if they had been read from disk. The module was made to help web designers change the colors of their “round corners” without having to fire up PhotoShop.
Example usage:
location /circles {
circle_gif;
}
Note
This module is not distributed with the NGINX source. See the installation instructions.
Syntax: | circle_gif |
---|---|
Default: | none |
Context: | location |
Syntax: | circle_min_radius radius |
---|---|
Default: | 10 |
Context: | location |
The minimum radius of generated circle images, in pixels.
Syntax: | circle_max_radius radius |
---|---|
Default: | 20 |
Context: | location |
The maximum radius of generated circle images, in pixels.
Syntax: | circle_step_radius step |
---|---|
Default: | 2 |
Context: | location |
The step in between generated circle images, in pixels.
To retrieve a circle image, just call a URL in the location you specified that ends like
<background color>/<foreground color>/<radius>.gif
Where radius is the radius in pixels, and the colors are 24-bit hex colors (e.g., ffffff
is white and 000000
is black). For example, with the configuration above, this URL would produce a black on white circle with a radius of 20 pixels:
/circles/ffffff/000000/20.gif
You first need the ImageMagick development headers. This module is not distributed with the NGINX source. You can download the circle_gif module here.
After extracting, add the following option to your NGINX ./configure
command:
--add-module=path/to/circle_gif/directory
Then make
and make install
as usual.
Please report bugs to Evan Miller.