*`file`: An image source that createImageBitmap can read.
See https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap
*`config`: See below
| Property Name | Purpose | Default Value |
| ------------- |-------------| -----:|
| `argorithm` | Algorithm used for downscaling (see below) | 'null' |
| `processByHalf` | Whether to process downscaling by `drawImage(source, 0, 0, source.width / 2, source.height / 2)` until the size is smaller than twice the target size. | true |
| `quality` | The quality of jpeg (or webp) | 0.5 |
| `maxWidth` | The maximum width for the downscaled image | 800 |
| `maxHeight` | The maximum height for the downscaled image | 600 |
| `mimeType` | specify image output type other than jpeg / If set `null`, function returns OffscreenCanvas | 'image/jpeg' |
##### `argorithm`
*`null`: Just resize with `drawImage()`. The best quality and fastest.
*`bilinear`: Better quality, slower. Comes from upstream (ericnogralesbrowser-image-resizer).
*`hermite`: Worse quality, faster. Comes from [viliusle/Hermite-resize](https://github.com/viliusle/Hermite-resize). Will dispatch workers for better performance.
* It is based on the specifications of recent versions of modern browsers and may not work with older browsers.
* See https://github.com/w3c/csswg-drafts/issues/4666#issuecomment-610962845
* Firefox support seems to be available from version 78.
- Color profile is srgb. Firefox 97 does not attach the ICC profile, but Chrome does.
- You can specify image/webp as the mimeType but [Safari does not support.](https://developer.apple.com/documentation/webkitjs/htmlcanvaselement/1630000-todataurl).