How to divide photo to X and Y pieces

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?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to divide photo to X and Y pieces

Post by fmw42 »

note that the above -crop uses +repage (to turn off the virtual canvas) not -repage.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to divide photo to X and Y pieces

Post by fmw42 »

see Anthony's new additions to -crop as of IM 6.5.8-9 at http://www.imagemagick.org/Usage/crop/#crop_equal
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to divide photo to X and Y pieces

Post by anthony »

Update. While reviewing the above discussion, and checking my Equal-Sized Tile Cropping addition, I discovered that it can be used as an alternative to -shave and used to 'tile crop' 1 tile from an image!

Yes tile cropping one tile seems nonsensical, but the 'spacing' arguments it provides allow you to also shave the image while preserving the original images canvas size and offset, in a better way that -shave does.

See IM Examples, specifically the last example for Shave
http://www.imagemagick.org/Usage/crop/#shave

While exploring this however I did find a bug for 'paged' images, and sumbitted a fix for IM v6.6.1-0 however this bug does not effect any normal image that does not contain a 'paged' offset on a virtual canvas
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply