<commit_before>Gregwar's Image class
=====================

The `Gregwar\Image` class purpose is to provide a simple object-oriented images handling and caching API.

Usage
=====

Basic handling
--------------

Using methods chaining, you can open, transform and save a file in a single line:

```php
<?php
require_once('lib/Gregwar/Image.php');

use Gregwar\Image\Image;

Image::open('in.png')
    ->resize(100, 100)
    ->negate()
    ->save('out.jpg');
```

The methods available are:

* `resize($width, $height, $background)`: resizes the image, will preserve scale and never
   enlarge it

* `scaleResize($width, $height, $background)`: resizes the image, will preserve scale

* `forceResize($width, $height, $background)`: resizes the image, will orce the image to
   be exactly $width by $height

* `cropResize($width, $height, $background)`: resizes the image preserving scale and croping
  the whitespaces

* `crop($x, $y, $w, $h)`: crops the image to a box located on coordinates $x,y and
   which size is $w by $h

* `negate()`: negates the image colors

* `brighness($b)`: applies a brightness effect to the image (from -255 to +255)

* `contrast($c)`: applies a contrast effect to the image (from -100 to +100)

* `grayscale()`: converts the image to grayscale
<commit_msg>Typo - "orce" changed to "force"<commit_after>Gregwar's Image class
=====================

The `Gregwar\Image` class purpose is to provide a simple object-oriented images handling and caching API.

Usage
=====

Basic handling
--------------

Using methods chaining, you can open, transform and save a file in a single line:

```php
<?php
require_once('lib/Gregwar/Image.php');

use Gregwar\Image\Image;

Image::open('in.png')
    ->resize(100, 100)
    ->negate()
    ->save('out.jpg');
```

The methods available are:

* `resize($width, $height, $background)`: resizes the image, will preserve scale and never
   enlarge it

* `scaleResize($width, $height, $background)`: resizes the image, will preserve scale

* `forceResize($width, $height, $background)`: resizes the image, will force the image to
   be exactly $width by $height

* `cropResize($width, $height, $background)`: resizes the image preserving scale and croping
  the whitespaces

* `crop($x, $y, $w, $h)`: crops the image to a box located on coordinates $x,y and
   which size is $w by $h

* `negate()`: negates the image colors

* `brighness($b)`: applies a brightness effect to the image (from -255 to +255)

* `contrast($c)`: applies a contrast effect to the image (from -100 to +100)

* `grayscale()`: converts the image to grayscale

{'fraction_non_alphanumeric': 0.15316358024691357, 'fraction_numerical': 0.013888888888888888, 'mean_word_length': 4.3685300207039335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6041388', 'n_tokens_mistral': 867, 'n_tokens_neox': 795, 'n_words': 316}