Hi,
I have a number of input images that contain multile smaller images, all in a single row. All the contained images are the same size. So, for example, the image input.png
may be 480x48
and contain 10 48x48
images, all in one row.
Using the imagemagick convert
tool (or any other tool supplied with the defaul imagemagick suite), I want to write a bash script that takes an input image, the number of images to cut, and then cuts them all into individual images.
The user interaction i can do, but I've not been able to get convert
to do the actual cutting. Can anyone suggest something? From reading the manual pages, i think this should work:
convert 'input.png[0x0+48+48]' output.png
but I get an error:
convert: no pixels defined in cache
tb_icons_l.png' @ magick/cache.c/OpenCache/3572. convert: No IDATs written into file
1.png' @ coders/png.c/PNGErrorHandler/1391.
Any ideas?