Skip to content

Tankōbon / hooks/use-image-upscaler / useImageUpscaler

Function: useImageUpscaler() ​

useImageUpscaler(src, enabled, pageKey?): ImageUpscalerResult

Defined in: hooks/use-image-upscaler.ts:46

Runs src through a local super-resolution model (ESRGAN via TensorFlow.js) when enabled. pageKey names the page src shows (<archive id>:<page index>): a page's blob URL is made again each time it is loaded, so only the page identifies a result worth keeping when the reader comes back to it. Without one, the URL itself is the key.

Parameters ​

src ​

string | null

enabled ​

boolean

pageKey? ​

string | null

Returns ​

ImageUpscalerResult