nl_tokens: Helper to create a new canvas .
pl_tokens: function createCanvas ( ) { canvas = document . createElement ( 'canvas' ) ; canvas . width = imageWidth ; canvas . height = imageHeight ; // Draw rectangle of a certain color covering the whole canvas area. // A JPEG image has black background by default and it might not be desirable. <mask> = canvas . getContext ( '2d' ) ; context . fillStyle = options . backgroundColor || 'white' ; context . fillRect ( 0 , 0 , imageWidth , imageHeight ) ; }