{"_id":"console-image","_rev":"5-bda8fb5105b2a3db670491121ccb11a3","name":"console-image","description":"Render images straight to your Chrome console","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"console-image","version":"0.0.0","description":"Render images straight to your Chrome console","main":"index.js","devDependencies":{"cave-automata-2d":"~0.2.2","ndarray-canvas":"~0.0.0","ndarray-fill":"~0.1.0","zeros":"~0.0.0","beefy":"~0.4.0"},"dependencies":{},"scripts":{"start":"beefy demo.js"},"repository":{"type":"git","url":"git://github.com/hughsk/console-image.git"},"keywords":["browserify","canvas","image","url","console","log"],"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughskennedy.com/"},"license":"MIT","readmeFilename":"README.md","readme":"# console-image #\n\nA [browserify](http://browserify.org/)-friendly port of\n[dunxrion](https://github.com/dunxrion)'s\n[console.image](https://github.com/dunxrion/console.image),\nso you can render images straight to your Chrome console!\n\n## Installation ##\n\n``` bash\nnpm install console-image\n```\n\n## Usage ##\n\n### `require('console-image')(image|url|canvas[, scale])` ###\n\nTakes an image/canvas element, or an image URL, and logs it to the console.\nOptionally, you can pass a scale argument to resize the image which defaults\nto 1.\n\n``` javascript\nvar logImage = require('console-image')\n\n// Pass it a URL:\nlogImage('https://www.google.com.au/images/srpr/logo4w.png')\n\n// Or an <img> element:\nvar image = document.querySelector('img')\nlogImage(image)\n\n// Or...\nvar render = require('ndarray-canvas')\n  , cave = require('cave-automata-2d')\n  , fill = require('ndarray-fill')\n  , zeros = require('zeros')\n\nfunction amplify(array) {\n  return fill(array, function(x, y) {\n    return array.get(x, y) * 255\n  })\n}\n\nvar array = zeros([150, 80])\ncave(array)(20)\namplify(array)\n\n// A <canvas> element!\nvar canvas = render(null, array)\nlogImage(canvas)\n```\n","_id":"console-image@0.0.0","dist":{"shasum":"4f6f647c2acf61a76b6ef8035d7a9fc451fa2048","tarball":"https://registry.npmjs.org/console-image/-/console-image-0.0.0.tgz","integrity":"sha512-+PYP3fxyrDnPcOk0ouHCavz8Hv2YX/f99pbN74f85CEmYyaVGT7I7ly8EFp+wtN/ZrbtZGwk+dF97sXeRSesdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDW4ViF/2j6Dov4ERit8U0h0v0QOkK0cJRRw4Ct+Zbm1wIgX1lUSrf1STVZqMggi3wqInS2vs5tcT0ZVSkUP1Mqifo="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}]}},"readme":"# console-image #\n\nA [browserify](http://browserify.org/)-friendly port of\n[dunxrion](https://github.com/dunxrion)'s\n[console.image](https://github.com/dunxrion/console.image),\nso you can render images straight to your Chrome console!\n\n## Installation ##\n\n``` bash\nnpm install console-image\n```\n\n## Usage ##\n\n### `require('console-image')(image|url|canvas[, scale])` ###\n\nTakes an image/canvas element, or an image URL, and logs it to the console.\nOptionally, you can pass a scale argument to resize the image which defaults\nto 1.\n\n``` javascript\nvar logImage = require('console-image')\n\n// Pass it a URL:\nlogImage('https://www.google.com.au/images/srpr/logo4w.png')\n\n// Or an <img> element:\nvar image = document.querySelector('img')\nlogImage(image)\n\n// Or...\nvar render = require('ndarray-canvas')\n  , cave = require('cave-automata-2d')\n  , fill = require('ndarray-fill')\n  , zeros = require('zeros')\n\nfunction amplify(array) {\n  return fill(array, function(x, y) {\n    return array.get(x, y) * 255\n  })\n}\n\nvar array = zeros([150, 80])\ncave(array)(20)\namplify(array)\n\n// A <canvas> element!\nvar canvas = render(null, array)\nlogImage(canvas)\n```\n","maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"time":{"modified":"2022-06-13T21:59:41.786Z","created":"2013-07-04T03:32:47.495Z","0.0.0":"2013-07-04T03:32:50.894Z"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughskennedy.com/"},"repository":{"type":"git","url":"git://github.com/hughsk/console-image.git"}}