Files
dashlibstorage/API.pic.md
2026-08-07 04:05:01 +02:00

28 lines
626 B
Markdown

# 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' }
```