Skip to content

Commit

Permalink
updating README to match new data format
Browse files Browse the repository at this point in the history
  • Loading branch information
catdad committed Nov 9, 2023
1 parent 9fe6d15 commit a6ce463
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const decode = require('heic-decode');
const {
width, // integer width of the image
height, // integer height of the image
data // ArrayBuffer containing decoded raw image data
data // Uint8ClampedArray containing pixel data
} = await decode({ buffer });
})();
```
Expand All @@ -54,13 +54,13 @@ const decode = require('heic-decode');
const {
width, // integer width of the image
height, // integer height of the image
data // ArrayBuffer containing decoded raw image data
data // Uint8ClampedArray containing pixel data
} = await image.decode();
}
})();
```

You can use this data to integrate with other imaging libraries for processing.
When the images are decoded, the return value is a plain object in the format of [`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). You can use this object to integrate with other imaging libraries for processing.

_Note that while the decoder returns a Promise, it does the majority of the work synchronously, so you should consider using a worker thread in order to not block the main thread in highly concurrent production environments._

Expand Down

0 comments on commit a6ce463

Please sign in to comment.