Reputation: 167
I'm using latest ImageMagick with PHP and this is my code:
$diplacementmap = new Imagick('displacement.png');
$android = new Imagick('android.png');
$android->compositeImage($diplacementmap, Imagick::COMPOSITE_DISPLACE, 0, 0);
echo $android;
For some reason, I'm not getting expected results. Why could it be?
Both files separately:
Android - https://i.sstatic.net/bYbYX.png
Displacement map - https://i.sstatic.net/6g4v9.png
Upvotes: 0
Views: 268
Reputation: 53071
Set your displacement values to 10,10 in ImageMagick or Imagick. When you set the arguments to 0,0, you may be getting some larger default.
For example in command line:
Input:
Displacement map:
convert android.png displacement.png -define compose:args=10,10 -compose displace -composite result10.png
or at 20
convert android.png displacement.png -define compose:args=20,20 -compose displace -composite result20.png
Upvotes: 3