Bun on X: "In the next version of Bun
`Bun.Image` - fast builtin multi-format image processing library"
In the next version of Bun
`Bun.Image` - fast builtin multi-format image processing library
`Bun.Image` works with other Bun APIs like `Bun.s3` - download an image from S3, resize it, convert it to jpeg, and save it back all in one.
On macOS & Windows, `Bun.Image.fromClipboard` copies an image from the clipboard to a `Bun.Image` (returning null if doesn't exist or Linux/FreeBSD/Android)
Bun.Image supports jpeg, png, and WebP on all platforms via libjpeg-turbo, libspng, and libwebp.
HEIC & AVIF are supported on macOS & Windows, using the builtin APIs from the operating system.
Image resizing is SIMD accelerated on both ARM64 & x64 and supports a variety of filters.
`Bun.Image` also has a `.placeholder()` method to generate a low quality image placeholder for an image, suitable for inlining into static HTML to quickly display a placeholder while the content loads.