Install
| Platform | Architecture |
|---|---|
| macOS | x64, arm64 |
| Linux (glibc) | x64, arm64 |
| Linux (musl) | x64, arm64 |
| Windows | x64, arm64 |
Usage
API
heifToJpeg(input, options?)
Convert a HEIF/HEIC buffer to JPEG.
- input
Buffer: HEIF/HEIC file contents - options.quality
number: JPEG quality, 1-100 (default: 85) - Returns
Promise<Buffer>: JPEG file contents
How it works
All processing runs on the libuv thread pool - the main thread is never blocked.- libheif parses the HEIF container
- libde265 decodes the HEVC payload to raw RGB pixels
- jpeg-encoder (pure Rust) encodes to JPEG