How to define absolute position for watermark image?

341 Views Asked by At

My background image will not be straight vertical shape, think of 3d covers, It will have some slope shape. I want to match above image to that coordinates of background image. Is there any way to define my upper image's top-left,top-right,bottom-left and bottom-right?

var fs = require('fs'),gm = require('gm').subClass({imageMagick:true});

    gm('background.png')
    .command('composite')
    .in('-page', '0+0')
    .in('front.png')
    .write('output.png', function(err) {
        if(!err) console.log("Written composite image.");
    });
0

There are 0 best solutions below