Crop Images with ImageMagick
ImageMagick provides powerful image cropping capabilities with precise control over dimensions, positions, and gravity settings. Crop images to exact specifications, remove unwanted areas, or extract specific regions with simple command-line syntax.
ImageMagick Crop Commands
Basic Crop by Dimensions
Crop 800x600 pixels starting at position (100, 50) from top-left corner.
Crop to Center Square
Crop image to centered square (1:1 aspect ratio).
Crop with Aspect Ratio
Crop to 16:9 widescreen aspect ratio from center.
Remove Borders (Auto-Crop)
Automatically remove uniform color borders around image.
Crop from Specific Corner
Crop 400x300 pixels from top-right corner.
Crop Images Online Visually
Skip manual coordinate calculations! Use ImageMagick.ai to crop images using natural language or our visual crop selector. Just say "crop to center square" or "remove borders" and we'll generate and execute the perfect ImageMagick crop command automatically.
Crop Images Online Now →ImageMagick Crop Syntax Explained
-crop WIDTHxHEIGHT+X+Y- Crop rectangle starting at position (X, Y)-crop WxH- Crop to dimensions from top-left (same as +0+0)-crop 16:9- Crop to aspect ratio (automatic sizing)-gravity center- Use center as reference point for crop+repage- Reset virtual canvas (removes offset metadata)-trim- Automatically remove uniform borders
ImageMagick Gravity Options
- northwest (top-left)
- north (top-center)
- northeast (top-right)
- west (middle-left)
- center (middle)
- east (middle-right)
- southwest (bottom-left)
- south (bottom-center)
- southeast (bottom-right)
Common ImageMagick Crop Use Cases
- Profile Pictures: Crop photos to square or circular aspect ratios
- Social Media: Crop images to platform-specific dimensions (Instagram, Facebook, Twitter)
- Product Photos: Remove unwanted background areas around products
- Thumbnail Generation: Extract center portion of images for previews
- Scanned Documents: Remove borders from scanned images
- Focus on Subject: Crop to highlight the main subject of an image
Advanced Cropping Techniques
Crop with Padding
Auto-crop then add 10-pixel white border padding.
Crop and Resize Together
Crop to square, then resize to exactly 500x500 pixels.
Smart Content-Aware Crop
Intelligent trim with 10% color tolerance for varied backgrounds.
Why Use ImageMagick for Image Cropping?
ImageMagick offers precise programmatic control over image cropping, making it ideal for automation and batch processing. Unlike manual cropping tools, ImageMagick can process thousands of images with consistent crop dimensions and positions. The gravity system provides intuitive reference points, while aspect ratio cropping ensures proper framing without manual calculations.
Related ImageMagick Operations: