Page 1 of 1

Bulge and pinch

Posted: 2011-08-26T12:02:10-07:00
by alioscopy
I am trying to bulge the top part of an image and at the same time to pinch the bottom part. I haven't figured out if this was possible using -distort Barrel.

Here is an example of what I would like to achieve. Would anyone know how to proceed?

Image

Thank you for you insights!

Re: Bulge and pinch

Posted: 2011-08-26T12:16:54-07:00
by alioscopy
Oops, I wasn't careful that Anthony had already answered this question on another post. I will therefore try to use -wave.

Re: Bulge and pinch

Posted: 2011-08-26T13:17:36-07:00
by fmw42
see also -distort arc at http://www.imagemagick.org/Usage/distorts/#arc
but a half wave is probably simpler, see http://www.imagemagick.org/Usage/warping/#wave

Re: Bulge and pinch

Posted: 2011-08-29T00:33:43-07:00
by anthony
It may be possible to use barrel for this, if the 'center' of the distortion is set to somewhere below the rectangle. I even provided the means by which the center can be specified. However I have not played with offset-centered barrel, and do not know just what can be done, and what effects the 'normalized radius' would have on the overall result.

It may be that exactly what normalized radius is used may need tweeking to get something more usable. I know for a fact that in on of my 'reflection' examples, I found that using a different aspect ratio image had marked impact on the results as the image height changed when the width didn't, thus effecting the barrel 'normalized radius' input.

For the example I talk about see...
http://www.imagemagick.org/Usage/advanced/#reflections
Specifically
Image
ASIDE: this image actually breaks the 'rules about reflections' but looked too cool to not include it in reflections, as it had come up a number of times in previous discussions.

It may be that you would need to add a 'fake and temporary extension' below the main image to achieve the desired (or other interesting) results. If someone does try this, please publish your results in this forum, if not this discussion, as it would be of interest to many people.