docs
This commit is contained in:
27
API.pic.md
Normal file
27
API.pic.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# pic
|
||||
|
||||
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
||||
|
||||
## `pic.getImageByHash`
|
||||
|
||||
*Source: `src/store/pic/getImageByHash.js`*
|
||||
|
||||
Returns the full-size image (AVIF) for a given hash.
|
||||
|
||||
```js
|
||||
const fn = getImageByHash(pool);
|
||||
const image = await fn(42, 'abc123');
|
||||
// => { buffer, w, h, size, contentType: 'image/avif' }
|
||||
```
|
||||
|
||||
## `pic.getThumbByHash`
|
||||
|
||||
*Source: `src/store/pic/getThumbByHash.js`*
|
||||
|
||||
Returns the thumbnail image (AVIF) for a given hash.
|
||||
|
||||
```js
|
||||
const fn = getThumbByHash(pool);
|
||||
const thumb = await fn(42, 'abc123');
|
||||
// => { buffer, w, h, contentType: 'image/avif' }
|
||||
```
|
||||
Reference in New Issue
Block a user