Using imagemagick with nodejs, I would like to rename my output with x-y by column and rows.
i can do on terminal but how can i implement this on my script as well.
Terminal example :
convert img.jpg -crop 512x512 -set filename:tile ./tiles/pano-%[fx:page.x/256]-%[fx:page.y/256] %[filename:tile]-0.jpg
var args = [
query.url+".jpg", // image
"-crop", // will crop the tiles
"512x512", // size of tile will be created
query.url+"/output.jpg" // Image output name.
];
im.convert(args, function(err) {
if(err) { throw err; }
res.end("Image crop complete");
});
}
Or can you suggest me anyother way to tile my image.
Ok i found the solution, This might help for other if they need.