Image Crop Order?

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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Post by glennrp »

Use %04d instead of %d, to keep the numerical and lexical order the same.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

I would also add a +repage, unless you actually want to preserve the 'offset' or position of the tile in the final images.

PNG can save the virtual canvas offsets of images. Even negative offsets.

Actually I'd hope to eventually write a script that will read the offsets of a tile cropped image, and rename the images as tile_XxY.png ot whatever. that is instead of a single number, generate two seperate numbers.

I have done this before for cre-naming image basied on their builtin offsets (jigsaw puzzle masks) but that was too specific to the problem at hand to be converted into a more general script.

If anyone likes to give it a go. I am sure it would be welcome. I'll add it and your name into IM Examples on Tile Cropping
http://www.cit.gu.edu.au/~anthony/graph ... #crop_tile
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply