High quality image resizing: ImageMagick vs. libplacebo
The article compares the image resizing quality of ImageMagick and libplacebo, testing various filters like Lanczos, Mitchell, and EWA algorithms. It finds that libplacebo's implementations often produce sharper and more accurate results than ImageMagick's, especially with the Jinc and Lanczos filters.
Background
- ImageMagick is a widely used open-source command-line tool for image processing (convert, resize, format conversion). It's been around for decades.
- libplacebo is a newer GPU-accelerated library focused on high-quality video/image processing, originally built for media players like mpv.
- The post compares the two for **downscaling** high-resolution images — a task where ImageMagick is the default tool but produces mediocre results with default settings.
- Key differences: ImageMagick runs on CPUs using general-purpose algorithms; libplacebo leverages GPU shaders for more sophisticated, perceptually accurate resampling (e.g., Lanczos, EWA, antialiasing).
- The debate matters to anyone working with large images (photography, game textures, maps, archival scans) where preserving fine detail and avoiding moiré/aliasing artifacts is important.
- ImageMagick can be tuned to produce better results, but libplacebo offers film-grade scaling with minimal configuration.