It's been awhile since I've played with Imagemagick. I do remember crop
and I can take an image named foo.png
and use:
convert foo.png -gravity north -crop 1000x100 bar.png
but my output is:
bar-0.png
bar-1.png
bar-2.png
bar-3.png
...
When I only want what's in bar-0.png
.
I've researched around and found:
- Cropping Images using Command Line Tools Only
- Cropping images with ImageMagic produces wrong size images - why?
- How can I trim just the left and right side of an image using Imagemagick in PHP?
- Cutting and Bordering
What is the correct way to crop an image and just get the first return? I'm not not worried about the aspect ratio or the size of the images. I'm just trying to get a sample of the image's first 100px.