Skip to content

Commit

Permalink
Docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandijck committed Nov 3, 2023
1 parent c8f961e commit c20607b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/usage/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $image = Image::useImageDriver(ImageDriver::GD)->load(string $pathToImage);

## Applying manipulations

Any of the [image manipulations](/image/v1/image-manipulations/overview) can be applied to the loaded `Image` by calling the manipulation's method. All image manipulation methods can be chained.
Any of the [image manipulations](/image/v3/image-manipulations/overview) can be applied to the loaded `Image` by calling the manipulation's method. All image manipulation methods can be chained.

```php
Image::load('example.jpg')
Expand All @@ -34,7 +34,7 @@ Image::load('example.jpg')

## Saving the image

Calling the `save` method on an `Image` will save the modifications to the original file. You can save your modified image by passing a `$outputPath` to the `save` method.
Calling the `save` method on an `Image` will save the modifications to the specified file.

```php
Image::load('example.jpg')
Expand Down
10 changes: 2 additions & 8 deletions docs/usage/saving-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ Image::load('example.jpg')

## Saving in a different image format

To save your image as a different image format call the `format` method and pass in the desired format. Currently the following formats are supported: `FORMAT_JPG`, `FORMAT_PJPG`, `FORMAT_PNG`, `FORMAT_GIF`, `FORMAT_WEBP` and `FORMAT_TIFF`.
To save your image as a different image format you can simply change the extension in your output path.

```php
Image::load('example.jpg')
->format(Manipulations::FORMAT_PNG)
->save('example.png');
```

Alternatively you can change the image format by saving the image with a different file extension than the original image. The `Image` package will then attempt to convert the image to the correct image format.

```php
Image::load('example.jpg')
->save('converted-example.png'); // Will convert the original image to PNG
```
You can find the supported image formats here: [Supported image formats](/image/v3/formats)

## Changing JPEG quality

Expand Down

0 comments on commit c20607b

Please sign in to comment.