nl_tokens: Creates image data from HTML image
pl_tokens: function createImageData ( image ) { const canvas = document . createElement ( 'canvas' ) const ctx = canvas . getContext ( '2d' ) const width = image . naturalWidth const <mask> = image . naturalHeight canvas . width = width canvas . height = height ctx . drawImage ( image , 0 , 0 ) return ctx . getImageData ( 0 , 0 , image . naturalWidth , image . naturalHeight ) }