Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cixtor/ratavarg
Gravatar like random image generator with 8bit styling
https://github.com/cixtor/ratavarg
Last synced: 10 days ago
JSON representation
Gravatar like random image generator with 8bit styling
- Host: GitHub
- URL: https://github.com/cixtor/ratavarg
- Owner: cixtor
- License: mit
- Created: 2013-08-31T07:31:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-11-07T01:25:57.000Z (about 3 years ago)
- Last Synced: 2024-04-14T20:11:47.887Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Ratavarg _(Gravatar backwards)_ is an alternative to [Gravatar.com](http://en.gravatar.com/).
The script uses PHP GD (PHP GIF Draw) to generate an image representing a grid of `5x5` cells, fifteen of the squares at the left side are filled randomly with colors and the remaining ten squares at the right are copied from the first ten squares of the left side generating a simetric graphic.
## Demo
A live demo is available in [here](https://cixtor.com/gravatar)
## Usage
Add a HTML tag referencing the PHP file as the source of the image, the script will respond with the data generated and an image header forcing the browser to consider the file as an image.
```
```Use this configuration in the `AccessFilename` of your project to change the format of the image generated, the script will automatically understand what extension was requested, supported formats are: jpeg, gif, and png.
```
RewriteEngine on
# RewriteBase /RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^avatar.(png|jpg|gif)$ avatar.php [L]
```
## What is Gravatar?
According to [Gravatar.com - What is Gravatar](http://en.gravatar.com/support/what-is-gravatar/):
> An **avatar** is an image that represents a person online, basically a little picture that appears next to your name when you interact with websites. A **Gravatar** is a `Globally Recognized Avatar`. You upload it and create your profile just once, and then when you participate in any Gravatar-enabled site, your Gravatar image will automatically follow you there.
>
> Gravatar is a free service for site owners, developers, and users. It is automatically included in every **WordPress** account and is run and supported by [Automattic](http://automattic.com/).