Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sergix44 committed Sep 17, 2023
1 parent 2ef1c1f commit d83719b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/docs/supported-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ $image = Image::make('path/to/image.jpg', Backend::IMAGICK);
$image = Image::canvas(300, 200, Backend::IMAGICK);
```

## Switching Backends on-the-fly

You can convert an image from one backend to another by using the `switchTo()` method.

```php
use SergiX44\ImageZen\Image;
use SergiX44\ImageZen\Backend;

$image = Image::make('path/to/image.jpg', Backend::GD);

// switch to imagick
$image->switchTo(Backend::IMAGICK);

// switch back to GD
$image->switchTo(Backend::GD);
```

## Supported Formats

All the available formats are listed in the `SergiX44\ImageZen\Format` enum,
Expand Down

0 comments on commit d83719b

Please sign in to comment.