I use this to generate html page as image. So, my command looks something like this:

$ phantomjs rasterize.js 'http://example.com' image.png

Is it possible to set border and color for generating image via phantomjs?

有帮助吗?

解决方案

Oh, well, it looks like it's impossible to do that via phantomjs. I choose another solution, via imagemagick. I installed it and now i use something like this:

$ convert input_img.png -bordercolor "LimeGreen" -compose Copy -border 4 output_img.png
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top