Reputation: 771
I am applying barrel distortion to an image in imagemagick. The desired resulting image would look something like this:
As you can see, the photo is no longer a square, and the voids are filled with black. I cannot figure out how to do this in imagemagick. All my distorts are always auto cropped to a square.
magick in.jpg -virtual-pixel Black -distort Barrel "0 0 -0.3" out.png
I realize I can manually add pixels to the image, but I really want it to just auto grow to the resulting size of the distort. I have tried various things I have found online, to no avail.
Upvotes: -1
Views: 40
Reputation: 771
The answer seems to be using the 4th (D) parameter to specify the zoom out.
The formula is defaultD = 1-(A + B + C). Then increase defaultD slightly to zoom out.
Upvotes: 0