I know for a fact what composite is doing and it is exactly as described in IM Example pages.fmw42 wrote:Neither can I and the fact that they don't seem to give the same results raises questions about what composite displace is really doing.
Code: Select all
convert label.jpg displace_map.jpg -virtual-pixel Gray \
-fx 'dy=10*(2v-1); p{i,j+dy}' displaced.jpg
Code: Select all
convert label.jpg displace_map.jpg -virtual-pixel Gray \
-fx 'dy=10*(2v-1); p[0,dy]' displaced.jpg
Could your -displacement vector be the wrong value? I can't see how an 'amp' of 40 relates between the DIY distortion example and your displacment mapping example! I think $amp would be directly related to the $xc value (which you use in your absolute distortion) and not to the radius of 40 (which you use in displacement map). That looks like where it is going wrong!
Add a amp=$xc and try again!