Bun (@bunjavascript) on X

X (formerly Twitter) ·

1 min read Original article ↗

Bun on X: "In the next version of Bun `Bun.Image` - fast builtin multi-format image processing library"

  • user avatar

    In the next version of Bun `Bun.Image` - fast builtin multi-format image processing library

  • user avatar

    `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.

    user avatar

    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)

    user avatar

    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.

    user avatar

    Image resizing is SIMD accelerated on both ARM64 & x64 and supports a variety of filters.

    user avatar

    `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.

  • user avatar

    In the next version of Bun `Bun.PhotoShop`