My apps are processing a lot of (large) images. Therefore I've been running into some OOM issues with my servers. For performance reasons I'd like to switch to libvips for image processing. I've done some benchmarks to show the difference between the image solutions and libvips is clearly the winner.
Test Configuration
Image: 11.57 MB JPEG Operations: Crop to aspect ratio → Resize (Lanczos) → Apply mirror bleed (edges + corners) Iterations: 3 per test
Results
| Size | Output Dimensions | Imagick | GD | libvips |
|---|---|---|---|---|
| 300×400mm | 4,701 × 5,882 px | 43,724ms | 1,482ms | 233ms |
| 400×500mm | 5,882 × 7,064 px | 5,100ms | 1,855ms | 216ms |
| 450×600mm | 6,473 × 8,245 px | 27,449ms | 2,298ms | 281ms |
Performance Comparison
| Size | Fastest | vs GD | vs Imagick |
|---|---|---|---|
| 300×400mm | libvips | 6.4x faster | 188x faster |
| 400×500mm | libvips | 8.6x faster | 24x faster |
| 450×600mm | libvips | 8.2x faster | 98x faster |
The vips extension has been added to the php extensions list!
-
Zander van der Meer moved item to board Live
1 month ago -
Dennis van Dalen moved item to project General
1 month ago -
Dennis van Dalen created the item
1 month ago