For 1000 JPGs resized to 1024px wide:
| Tool | Time | Notes |
|---|
ImageMagick convert | 95 seconds | Baseline |
ImageMagick magick | 80 seconds | Newer command syntax |
GraphicsMagick gm convert | 55 seconds | Fork with optimizations |
| Sharp (Node.js) | 18 seconds | C++ libvips backend |
| libvips direct | 12 seconds | C native |
GraphicsMagick is roughly 30-40% faster than ImageMagick for batch operations. Sharp and libvips are dramatically faster but require Node.js or C dependencies.
For most CLI workflows: ImageMagick. For high-volume batch: GraphicsMagick or Sharp.
| Feature | ImageMagick | GraphicsMagick |
|---|
| Format support | 200+ formats | 90+ formats |
| Color profile (ICC) | Excellent | Good |
| Image compositing | Extensive | Adequate |
| HDR processing | Yes | Limited |
| Animation support | Good (GIF, MNG) | Basic |
| Vector formats (SVG) | Limited | Limited |
| Plugins / Extensions | Yes | Limited |
| Memory efficiency | Per-file | Better at scale |
| Stability | Mostly stable | More stable |
For specialty work (HDR, complex compositing): ImageMagick. For straightforward batch operations: GraphicsMagick.
For simple operations, syntax is similar:
Resize image:
# ImageMagick
convert input.jpg -resize 1024x output.jpg
# GraphicsMagick
gm convert input.jpg -resize 1024x output.jpg
Convert format:
# ImageMagick
convert input.png output.jpg
# GraphicsMagick
gm convert input.png output.jpg
Add watermark:
# ImageMagick
convert input.jpg watermark.png \
-gravity southeast -geometry +20+20 \
-composite output.jpg
# GraphicsMagick
gm composite -gravity southeast -geometry +20+20 \
watermark.png input.jpg output.jpg
GraphicsMagick uses a slightly different syntax for compositing.
For resizing 100K product images:
ImageMagick approach:
mogrify -path output/ -resize 1024x -quality 90 *.jpg
mogrify is in-place but with -path it writes to a different directory.
GraphicsMagick approach:
for f in *.jpg; do
gm convert "$f" -resize 1024x -quality 90 "output/${f}"
done
For 100K images: ImageMagick takes ~3 hours, GraphicsMagick ~1.8 hours.
For batch automation, see Batch Processing Files Guide.
Both tools work in single-threaded mode by default. For parallel:
With GNU parallel:
ls *.jpg | parallel "gm convert {} -resize 1024x output/{}"
This runs N parallel jobs based on CPU cores. For 100K images on a 16-core CPU: ~7 minutes.
For ImageMagick:
parallel "convert {} -resize 1024x output/{}" ::: *.jpg
Same performance.
ImageMagick has a security policy file:
<!-- /etc/ImageMagick-7/policy.xml -->
<policy domain="resource" name="memory" value="2GiB"/>
<policy domain="resource" name="map" value="2GiB"/>
<policy domain="resource" name="width" value="32KP"/>
<policy domain="resource" name="height" value="32KP"/>
These limits prevent denial-of-service via large images. For high-resolution work, raise the limits.
For server environments, the policy file ensures stability under load.
GraphicsMagick was forked specifically for:
- Performance: optimized memory management
- Stability: fewer changes between versions
- Embeddability: cleaner library API
- Predictability: simpler feature set
For production servers running thousands of conversions per hour, GraphicsMagick's stability matters. ImageMagick has had multiple security CVEs over the years; GraphicsMagick has fewer.
For a Cloudinary-style image pipeline:
| Workflow | Best fit |
|---|
| Per-request resize on web requests | Sharp (Node.js) for max speed |
| Nightly batch resize of 1M images | GraphicsMagick or libvips |
| One-off photo retouching | ImageMagick |
| Color profile-aware conversion | ImageMagick |
| Watermarking | ImageMagick |
| HDR tone mapping | ImageMagick |
| Server-side avatar resizing | Sharp or GraphicsMagick |
For most "I need a tool for image processing": ImageMagick. For specific high-volume batch: GraphicsMagick or Sharp.
For JPG quality at the same setting:
| Tool | JPG quality 85 | File size (1080p) |
|---|
| ImageMagick | Reference | 280 KB |
| GraphicsMagick | Slightly better | 270 KB |
| Sharp (libvips) | Best | 250 KB |
GraphicsMagick uses slightly different JPG encoding parameters that produce 3-5% smaller files at similar quality.
For our image converter, Sharp is the engine for fastest conversion.
ICC profile preservation:
| Tool | sRGB → AdobeRGB | AdobeRGB → DCI-P3 | CMYK → RGB |
|---|
| ImageMagick | Excellent | Excellent | Excellent |
| GraphicsMagick | Good | Good | Acceptable |
| Sharp | Good | Limited | Limited |
For color-critical work: ImageMagick. For general web image conversion: any of the three is fine.
For CMYK details, see CMYK vs RGB Printing.
ImageMagick "memory exhausted": policy.xml limits hit. Edit memory and map limits.
GraphicsMagick missing format support: PSD or TIFF subset not supported. Use ImageMagick.
Color shift after conversion: ICC profile lost. Use -profile flag explicitly.
Slow on large images: 4K+ images need more memory. Consider Sharp for high-resolution batch work.
Permission errors on write: file ownership and permissions issue, not tool problem.
For most workflows: stay with ImageMagick (broader features, better support). For high-volume batch on servers: consider GraphicsMagick.
Yes. Sharp uses libvips (C++) with sequential processing. 5-10x faster than ImageMagick for typical operations. Requires Node.js.
Yes. They install side-by-side without conflict. Different command names (magick/convert vs gm).
Pillow is Python's image library. Slower than ImageMagick but Pythonic API. Good for scripts that integrate with other Python code.
ImageMagick 7 supports AVIF. JPEG XL support is improving. GraphicsMagick has slower adoption of new formats.
convert --version # ImageMagick
magick --version # ImageMagick 7+
gm version # GraphicsMagick
For batch image processing: ImageMagick is the universal default with broadest feature support. GraphicsMagick is the high-volume server-side choice with better stability. Sharp/libvips for maximum speed in Node.js environments. Match the tool to your specific workload. Our image converter handles single-file conversions.