Free transform / Warp (Photoshop alternative)

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
tresorjoe
Posts: 13
Joined: 2018-04-12T02:19:12-07:00
Authentication code: 1152

Free transform / Warp (Photoshop alternative)

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Free transform / Warp (Photoshop alternative)

Post 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.
snibgo's IM pages: im.snibgo.com
tresorjoe
Posts: 13
Joined: 2018-04-12T02:19:12-07:00
Authentication code: 1152

Re: Free transform / Warp (Photoshop alternative)

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Free transform / Warp (Photoshop alternative)

Post 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
tresorjoe
Posts: 13
Joined: 2018-04-12T02:19:12-07:00
Authentication code: 1152

Re: Free transform / Warp (Photoshop alternative)

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Free transform / Warp (Photoshop alternative)

Post 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
Post Reply