gm convert inputfile -gravity center -extent 450x225 outputfile
If you want to integrate easily with node.js, you can use stdin/stdout as files:
gm convert - -gravity center -extent 450x225 -
Then, you can pipe you image data to and from the gm process.