Merge pull request #1035 from JustTestCode/patch-1

Update README.md
This commit is contained in:
Surma
2021-05-30 10:06:01 +01:00
committed by GitHub

View File

@@ -81,7 +81,7 @@ When you have encoded an image, you normally want to write it to a file.
This example takes an image that has been encoded as a `jpg` and writes it to a file:
```js
const rawEncodedImage = (await image.encodedWidth.mozjpeg).binary;
const rawEncodedImage = (await image.encodedWith.mozjpeg).binary;
fs.writeFile('/path/to/new/image.jpg', rawEncodedImage);
```