<commit_before># SLIR (Smart Lencioni Image Resizer)

SLIR (Smart Lencioni Image Resizer) resizes images, intelligently sharpens, crops based on width:height ratios, color fills transparent GIFs and PNGs, and caches variations for optimal performance.

For questions or support, please [visit the SLIR Google Group](https://groups.google.com/forum/?fromgroups#!forum/smart-lencioni-image-resizer). If you have found a bug, please [use the issue tracker](https://github.com/lencioni/SLIR/issues).

## Requirements

* [PHP](http://php.net) 5.1.2+
* [GD Graphics Library](http://php.net/manual/en/book.image.php) -- must be a version that supports `imageconvolution()`, such as the bundled version

### Recommended

* [mod_rewrite](http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html)

## Setting up

Download and unpack to a directory in your web root. I recommend putting SLIR in `/slir/` for ease of use. For example, if your website is `http://yourdomain.com`, then SLIR would be at `http://yourdomain.com/slir/`.

After you have SLIR downloaded, visit `http://yourdomain.com/slir/install/` in your favorite web browser.

## Usage

To use SLIR, place an `<img\>` tag with the src pointing to the path of SLIR (typically "/slir/") followed by the parameters, followed by the path to the source image to resize. All parameters follow the pattern of a one-letter code and then the parameter value:

<table><commit_msg>Added a quick example to opening Usage paragraph<commit_after># SLIR (Smart Lencioni Image Resizer)

SLIR (Smart Lencioni Image Resizer) resizes images, intelligently sharpens, crops based on width:height ratios, color fills transparent GIFs and PNGs, and caches variations for optimal performance.

For questions or support, please [visit the SLIR Google Group](https://groups.google.com/forum/?fromgroups#!forum/smart-lencioni-image-resizer). If you have found a bug, please [use the issue tracker](https://github.com/lencioni/SLIR/issues).

## Requirements

* [PHP](http://php.net) 5.1.2+
* [GD Graphics Library](http://php.net/manual/en/book.image.php) -- must be a version that supports `imageconvolution()`, such as the bundled version

### Recommended

* [mod_rewrite](http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html)

## Setting up

Download and unpack to a directory in your web root. I recommend putting SLIR in `/slir/` for ease of use. For example, if your website is `http://yourdomain.com`, then SLIR would be at `http://yourdomain.com/slir/`.

After you have SLIR downloaded, visit `http://yourdomain.com/slir/install/` in your favorite web browser.

## Usage

To use SLIR, place an `<img\>` tag with the `src` attribute pointing to the path of SLIR (typically "/slir/") followed by the parameters, followed by the path to the source image to resize (e.g. `<img src="/slir/w100/path/to/image.jpg"/>`). All parameters follow the pattern of a one-letter code and then the parameter value:

<table>
{'fraction_non_alphanumeric': 0.1138377641445126, 'fraction_numerical': 0.004430811179277437, 'mean_word_length': 4.506566604127579, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2689700', 'n_tokens_mistral': 908, 'n_tokens_neox': 862, 'n_words': 346}