Page 1 of 1

How to split a very long (=height) image into parts?

Posted: 2017-09-08T21:57:59-07:00
by bensto
Sometimes I print some very loooooooong webpages into a *.PNG picture.

Since the height of the resulting image is larger than ~ 32000 pixels a lot of image viewer and image editors cannot handle it correctly.

So I have to split it into several chunks.

Lets say I have such an image file "myhugepic.png".
How can I split the image after a height of 30000 pixels (width remains as original) and put the first part into a new picture file myhugepic001.png.
The remaining image parts should be stored acccordingly into image files myhugepic002.png, myhugepic003.png,....

How would an approrpirate command with ImageMagick look like?

Thank you
Ben

Re: How to split a very long (=height) image into parts?

Posted: 2017-09-08T22:30:41-07:00
by snibgo

Code: Select all

convert myhugepic.png -crop x3000 +repage myhugepic%03d.png
This creates multiple outputs, each 3000 pixels high except the last, which may be not as tall.