https://github.com/blacha/sharp-webp-resize
https://github.com/blacha/sharp-webp-resize
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/blacha/sharp-webp-resize
- Owner: blacha
- Created: 2024-12-05T21:33:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-05T22:49:50.000Z (over 1 year ago)
- Last Synced: 2025-01-14T11:47:01.117Z (over 1 year ago)
- Language: JavaScript
- Size: 173 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastShrinkOnLoad imagery artifacts
When greatly resizing image with `fastShrinkOnLoad:true` produces edge artifacts with sharp borders
given a source image 512x512

then resizing down to 32x32, then blowing the image back to 128x128 produces the following outputs:

Turning off fastShrinkOnLoad reduces the artifacts but introduces new ones

Switching to Mitchell kernel reduces the white of lanczos

Filling in the background with a consistent color also fixes the shrink on load

### Usage
Install dependencies
```
npm install
```
generate the images
```
node index.mjs
```