Skip to content

Commit

Permalink
Update README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Oct 26, 2023
1 parent b59f758 commit 6bb0ef8
Showing 1 changed file with 42 additions and 17 deletions.
59 changes: 42 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center">
<a href="https://github.com/yii2-extensions/template" target="_blank">
<a href="https://github.com/yii2-extensions/imagine" target="_blank">
<img src="https://www.yiiframework.com/image/yii_logo_light.svg" height="100px;">
</a>
<h1 align="center">Yii2-Template.</h1>
<h1 align="center">Imagine</h1>
<br>
</p>

Expand All @@ -13,32 +13,57 @@
<a href="https://github.com/yiisoft/yii2/tree/2.2" target="_blank">
<img src="https://img.shields.io/badge/Yii2%20version-2.2-blue" alt="yii2-version">
</a>
<a href="https://github.com/yii2-extensions/template/actions/workflows/build.yml" target="_blank">
<img src="https://github.com/yii2-extensions/template/actions/workflows/build.yml/badge.svg" alt="PHPUnit">
<a href="https://github.com/yii2-extensions/imagine/actions/workflows/build.yml" target="_blank">
<img src="https://github.com/yii2-extensions/imagine/actions/workflows/build.yml/badge.svg" alt="PHPUnit">
</a>
<a href="https://codecov.io/gh/yii2-extensions/template" target="_blank">
<img src="https://codecov.io/gh/yii2-extensions/template/branch/main/graph/badge.svg?token=MF0XUGVLYC" alt="Codecov">
</a>
<a href="https://github.com/yii2-extensions/template/actions/workflows/static.yml" target="_blank">
<a href="https://codecov.io/gh/yii2-extensions/imagine" target="_blank">
<img src="https://codecov.io/gh/yii2-extensions/imagine/graph/badge.svg?token=Sx1GlGe8n2" alt="Codecov">
</a>
<a href="https://github.com/yii2-extensions/imagine/actions/workflows/static.yml" target="_blank">
<img src="https://github.com/yii2-extensions/gii/actions/workflows/static.yml/badge.svg" alt="PHPStan">
</a>
<a href="https://github.com/yii2-extensions/template/actions/workflows/static.yml" target="_blank">
<img src="https://img.shields.io/badge/PHPStan%20level-2-blue" alt="PHPStan level">
</a>
<a href="https://github.styleci.io/repos/698621511?branch=main" target="_blank">
<img src="https://github.styleci.io/repos/698621511/shield?branch=main" alt="Code style">
<a href="https://github.com/yii2-extensions/imagine/actions/workflows/static.yml" target="_blank">
<img src="https://img.shields.io/badge/PHPStan%20level-3-blue" alt="PHPStan level">
</a>
<a href="https://github.styleci.io/repos/708447136?branch=main" target="_blank">
<img src="https://github.styleci.io/repos/708447136/shield?branch=main" alt="Code style">
</a>
</p>

## Requirements
## Installation

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

The minimun version of `PHP` required by this package is `PHP 8.1`.
```
php composer.phar require --dev --prefer-dist yii2-extensions/imagine
```

For install this package, you need [composer](https://getcomposer.org/).
or add

```
"yii2-extensions/imagine": "dev-main"
```

to the require-dev section of your `composer.json` file.

## Usage

[Check the documentation docs](/docs/README.md) to learn about usage.
This extension is a wrapper to the [Imagine](https://imagine.readthedocs.org/) and also adds the most commonly used
image manipulation methods.

The following example shows how to use this extension:

```php
use yii\imagine\Image;

// frame, rotate and save an image
Image::frame('path/to/image.jpg', 5, '666', 0)
->rotate(-8)
->save('path/to/destination/image.jpg', ['jpeg_quality' => 50]);
```


## Testing

Expand Down

0 comments on commit 6bb0ef8

Please sign in to comment.