Page 1 of 1

Free transform / Warp (Photoshop alternative)

Posted: 2019-03-01T00:49:43-07:00
by tresorjoe
Hello,

Tried to use the -distort function with Shepards (taffy-like) approach to move the area around certain control points. As per Shepards and as perfectly explained in the examples section, the transformation does "...it a bit like those 'pins' at the control points are not actually round pins, but 'crosses', forcing the 'jelly' or 'rubber sheet' holding the image to also preserve the rotation of the image".

Is there an alternative approach that does it a little bit more like the Free Transform / Warp of Photoshop? If such kind of function is not available in ImageMagick, do you know of any alternative library available that can be driven e.g. command-line based?

Thanks,
Joe

Re: Free transform / Warp (Photoshop alternative)

Posted: 2019-03-01T03:33:23-07:00
by snibgo
I discuss methods for this in Pin or push. However, the real problem is the user interaction. IM doesn't include a GUI.

I assume you've looked at Gimp.

Re: Free transform / Warp (Photoshop alternative)

Posted: 2019-03-04T02:55:18-07:00
by tresorjoe
I am actually comparing it to Photoshop's Free Transform option using the "Warp" button.

Here's what ImageMagick would deliver if I did a centric Shepards move with 4 fixed points (corners) and 3 move points (center-left, center-center, center-right):
https://www.dropbox.com/s/l9bs03bua1yu ... e.tif?dl=0

And here's what Photoshop would do with similar parameters:
https://www.dropbox.com/s/foisr3wwkpu46 ... e.tif?dl=0

Is there a way with ImageMagick or any other command-line based approach to do something similar as Photoshop does? I don't really need a GUI for that, would prefer command-based driven (text) approach.

Re: Free transform / Warp (Photoshop alternative)

Posted: 2019-03-04T10:33:34-07:00
by fmw42
Is there a way with ImageMagick or any other command-line based approach to do something similar as Photoshop does? I don't really need a GUI for that, would prefer command-based driven (text) approach.
I do not think there is anything similar at the current time in ImageMagick, because ImageMagick does not have a GUI. But you can do similar things by picking control points and using distort perspective. See https://imagemagick.org/Usage/distorts/#perspective

Re: Free transform / Warp (Photoshop alternative)

Posted: 2019-03-06T00:28:57-07:00
by tresorjoe
sorry, couldn't make it work at all using -distort Perspective. Somehow it doesn't keep the corner points and the desired effect (warp curve) isn't applied. Can you provide me an example command to get something similar as in my previous post where Shepards and Photoshop Warp are compared?
Many thanks.

Re: Free transform / Warp (Photoshop alternative)

Posted: 2019-03-06T00:38:05-07:00
by fmw42
Perspective does not do curves. There is no equivalent to what you want to do in ImageMagick. See other tools for mesh warping such as skimage