Page 1 of 1

tiling an image at fixed size with "extra" border

Posted: 2015-09-29T19:18:20-07:00
by jedierikb
I want to divide an image into equally sized tiles, and using this command:

Code: Select all

convert -crop 500x500 obama.jpg o_%d.png
It works great. The "extra" slivers at the end are as expected.

However, I want to add 1px more around each tile. The result should be that each adjacent tile has the same overlapping pixels.
(For the edge pieces I would like to add 1px of transparency.)

Is there an easy way 'out of the box' to do this?

Re: tiling an image at fixed size with "extra" border

Posted: 2015-09-29T23:16:54-07:00
by fmw42
add -background none -extent 500x500 to the end of your command to add the transparency. To get overlapping, if on Linux/MacOSX/Windows with Cygwin, see my script, overlapcrop, at my link below.

You can run the script and pipe the output to another convert to add the transparency.

Or I could possibly modify the script to add the transparency