Look, seriously, I appreciate your help. But when I use "+distort affine", it's not because I want to abuse it, or because I am too lazy to read the documentation. I do read it, I just don't understand it.
I use "+distort affine", because I actually need an affine distortion -- that is an affine transformation of the image reference frame. That is, a constant shift plus a linear transformation of the axis. The linear transformation of the axis is needed, even though in is unitary in the original post, it won't be unitary at the time of an actual application.
The "splice" option seems to be almost what I need, except that it pads the image with white pixels, whereas I need transparent ones.
After your recommendation I concocted the following command:
Code: Select all
convert rogers.png -alpha set -virtual-pixel transparent +distort affine "1,1 1,1 1,50 1,50 50,1 50,50" -alpha set -virtual-pixel transparent -splice "50x50" output.png
The result is the following:
This is almost
what I need except I still need actual transparency in place of the white bands.