cut off parts of image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
maceis

cut off parts of image

Post by maceis »

Hello together,

how can I cut of parts of an image but only from some edges
e.g. I have images and I want to cut of 5 px from the right and 5 px from the bottom of the images.

Thanks in advance
maceis

Edit: I found out right after posting my question.
Sorry.
If anyone finds this posting
"convert image.jpg -crop 400x300+0+0" will cut off anything larger then 400x300. The upper left corner is defined with +0+0 so nothing will be cut of from the top or right side of the image.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: cut off parts of image

Post by anthony »

There is also -chop to specifically chop 5 pixels from any edge (or any row or column) regardless of how big an image is. See IM examples, Cutting and Bordering
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply