updated npm deps and added optional arguments for captured image dimensions