Compress image in an hourglass format

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
portscanner

Compress image in an hourglass format

Post by portscanner »

First - please excuse me if I dont use the correct terms. I do not do much graphics work, so I will probably not use the correct names for things.

I looked all over (including Anthony Thyssen's pages which I found were fantastic) but I could find what I was looking for. I want to use "convert" to compress the center of an image by about 15-20%, leaving the top and the bottom thirds of the image alone. Sort of change the image into an hourglass type of shape.

Does anyone know how to do that?

Thank you!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Not at this time. though you could create distortion maps to do that using some maths.

the perspective transform (DIY currently) can do a 'tie' shape with a zero crossover point, but not an hourglass figure.

If you really want and I get time, I could try to create a simple one dimension X distortion map for you, but I perform you to have a go and pass me back the results.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
portscanner

Post by portscanner »

Thank you. I think you pointed me in a direction where I can get my own solution!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Last night I worked out a one dimensional solution for you.
http://www.cit.gu.edu.au/~anthony/graph ... _hourglass
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
portscanner

Post by portscanner »

That's it!!!!!

Thank you!
Post Reply