Tuesday, 2 May 2017

How to define absolute position for watermark image?

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.");
    });



via phpnerd

No comments:

Post a Comment