I don't know if I am not understanding the instructions for using the y displacement map (mask image) or not. The documentation says:
"However, if you specify mask, composite image is the horizontal X displacement and mask the vertical Y displacement."
Here are my tests:
Image: morphA.gif
X displacement image: triangle_interp_x.png
Y displacement image: triangle_interp_y.png
Displacement along x only: morphA_dx.gif
composite triangle_interp_x.png morphA.gif -displace 100x0 morphA_dx.gif
Displacement along x and y using only x displacement image: morphA_dx_dx.gif
composite triangle_interp_x.png morphA.gif -displace 100x100 morphA_dx_dx.gif
Displacement along x and y using x and y displacement images: morphA_dx_dy.gif
composite triangle_interp_x.png morphA.gif triangle_interp_y.png -displace 100x100 morphA_dx_dy.gif
Am I doing something wrong or is this a bug?
possible bug in -displace in IM 6.4.1-7
Re: possible bug in -displace in IM 6.4.1-7
Ping Anthony about this bug, we believe he was in charge of the last few revisions of this option.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug in -displace in IM 6.4.1-7
Thanks. I sent him a message last night.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug in -displace in IM 6.4.1-7
Summery of very lengthy discussion....
The composite -displace operator using two separate X and Y mapping images has been broken since the three image composite masking was finally correctly fixed to allow for greyscale masks, and blending of the composite and original destination image data.
I have NOT complained about this as composite masking was FAR more important than three image displacement.
I had been planing to properly fix displacement for a long time, but would move image displacement completely out of 'compose' and into the 'distort' modules where it belongs, along with absolute coordinate 'distortion' mapping, as defined by the FX equivalents in IM Examples, Distortion LUT Mapping.
This would also open the way for the future use of 'slope' determinations, allowing for the use of area resampling techniques.
Fred agrees with me that this is the best idea, though it will mean -displace will no longer be available from "composite".
It is on my TODO list.
The composite -displace operator using two separate X and Y mapping images has been broken since the three image composite masking was finally correctly fixed to allow for greyscale masks, and blending of the composite and original destination image data.
I have NOT complained about this as composite masking was FAR more important than three image displacement.
I had been planing to properly fix displacement for a long time, but would move image displacement completely out of 'compose' and into the 'distort' modules where it belongs, along with absolute coordinate 'distortion' mapping, as defined by the FX equivalents in IM Examples, Distortion LUT Mapping.
This would also open the way for the future use of 'slope' determinations, allowing for the use of area resampling techniques.
Fred agrees with me that this is the best idea, though it will mean -displace will no longer be available from "composite".
It is on my TODO list.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/