Try ImageMagick.ai - No Command Line Required

Process images using natural language. Free online tool powered by AI.

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

convert input.jpg -crop 800x600+100+50 output.jpg

Crop 800x600 pixels starting at position (100, 50) from top-left corner.

Crop to Center Square

convert input.jpg -gravity center -crop 1:1 +repage output.jpg

Crop image to centered square (1:1 aspect ratio).

Crop with Aspect Ratio

convert input.jpg -gravity center -crop 16:9 +repage output.jpg

Crop to 16:9 widescreen aspect ratio from center.

Remove Borders (Auto-Crop)

convert input.jpg -trim +repage output.jpg

Automatically remove uniform color borders around image.

Crop from Specific Corner

convert input.jpg -gravity northeast -crop 400x300+0+0 output.jpg

Crop 400x300 pixels from top-right corner.

Batch Crop Multiple Images

mogrify -gravity center -crop 800x800+0+0 +repage *.jpg

Crop all JPG images to 800x800 centered squares.

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

Position:
  • 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

convert input.jpg -trim -bordercolor white -border 10x10 output.jpg

Auto-crop then add 10-pixel white border padding.

Crop and Resize Together

convert input.jpg -gravity center -crop 1:1 +repage -resize 500x500 output.jpg

Crop to square, then resize to exactly 500x500 pixels.

Smart Content-Aware Crop

convert input.jpg -trim -fuzz 10% +repage output.jpg

Intelligent trim with 10% color tolerance for varied backgrounds.

Split Image into Tiles

convert input.jpg -crop 25%x25% +repage tile_%d.jpg

Divide image into 4x4 grid of 16 tiles.

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.

Try ImageMagick.ai - No Command Line Required

Process images using natural language. Free online tool powered by AI.