Page 1 of 1

possible bug in -displace in IM 6.4.1-7

Posted: 2008-06-14T12:53:50-07:00
by fmw42
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
Image

X displacement image: triangle_interp_x.png
Image

Y displacement image: triangle_interp_y.png
Image


Displacement along x only: morphA_dx.gif
composite triangle_interp_x.png morphA.gif -displace 100x0 morphA_dx.gif
Image

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
Image

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
Image


Am I doing something wrong or is this a bug?

Re: possible bug in -displace in IM 6.4.1-7

Posted: 2008-06-15T15:54:44-07:00
by magick
Ping Anthony about this bug, we believe he was in charge of the last few revisions of this option.

Re: possible bug in -displace in IM 6.4.1-7

Posted: 2008-06-15T16:01:28-07:00
by fmw42
Thanks. I sent him a message last night.

Re: possible bug in -displace in IM 6.4.1-7

Posted: 2008-06-17T16:20:21-07:00
by anthony
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.