A suite to track Project Diva score statistics and ratings / D4DJ event data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
projectdivar/server/node_modules/readimage
sigonasr2 0785506fad Update and test twitter endpoints and connections. Prepare java spring server 4 years ago
..
node_modules/jpeg-js Update and test twitter endpoints and connections. Prepare java spring server 4 years ago
.npmignore Update and test twitter endpoints and connections. Prepare java spring server 4 years ago
LICENSE Update and test twitter endpoints and connections. Prepare java spring server 4 years ago
README.md Update and test twitter endpoints and connections. Prepare java spring server 4 years ago
package.json Update and test twitter endpoints and connections. Prepare java spring server 4 years ago
readimage.js Update and test twitter endpoints and connections. Prepare java spring server 4 years ago

README.md

readimage

NPM

Read an image into memory converting from whatever format it is in to a consistent set of RGBA frames independent on input format.

Why? Because image formats are a pain to worry about.

How fast is it? Not really sure. I don't need it to be fast.

How robust is it? Not really sure, if you have issues please file them!


var fs = require("fs")
var readimage = require("readimage")

var filedata = fs.readFileSync("cat.png")

readimage(filedata, function (err, image) {
  if (err) {
    console.log("failed to parse the image")
    console.log(err)
  }
  console.log(image)
})

API

require("readimage")(imageBuffer, callback)

Read a buffer containing an image in PNG, GIF, or JPG format into a consistent RGBA format.

FORMAT

height, width, and an array of sequential frames. Non-animated images will have a single frame.

{
  height: 100, // pixels
  width: 100, // pixels
  frames: [
    {
      data: ... // RGBA buffer
      delay: 100 // milliseconds before switching to next frame. OPTIONAL
    },
    {
      data: ...
      delay: 10
    }
  ]
}

LICENSE

MIT