Update README.md

To close typo in example code as reported in issue #1051
This commit is contained in:
Alexandre Desroches
2021-06-11 09:36:30 -04:00
committed by GitHub
parent 9a37cc7959
commit 5e14444b13

View File

@@ -39,9 +39,9 @@ The returned `image` object is a representation of the original image, that you
When an image has been ingested, you can start preprocessing it and encoding it to other formats. This example will resize the image and then encode it to a `.jpg` and `.jxl` image:
```js
await image.decoded; //Wait until the image is decoded before running preprocessors
await image.decoded; //Wait until the image is decoded before running preprocessors.
const preprocessOptions: {
const preprocessOptions = {
resize: {
enabled: true,
width: 100,
@@ -50,7 +50,7 @@ const preprocessOptions: {
}
await image.preprocess(preprocessOptions);
const encodeOptions: {
const encodeOptions = {
mozjpeg: {}, //an empty object means 'use default settings'
jxl: {
quality: 90,