Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-pixels

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-pixels - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

3

dom-pixels.js

@@ -123,2 +123,5 @@ 'use strict'

default:
if(Buffer.isBuffer(url)) {
url = 'data:' + type + ';base64,' + url.toString('base64')
}
if(url.indexOf('data:image/gif;') === 0) {

@@ -125,0 +128,0 @@ dataGif(url, cb)

@@ -128,3 +128,9 @@ 'use strict'

}
if(url.indexOf('data:') === 0) {
if(Buffer.isBuffer(url)) {
if(!type) {
cb(new Error('Invalid file type'))
return
}
doParse(type, url, cb)
} else if(url.indexOf('data:') === 0) {
try {

@@ -131,0 +137,0 @@ var buffer = parseDataURI(url)

5

package.json
{
"name": "get-pixels",
"version": "3.0.1",
"version": "3.1.0",
"description": "Reads the pixels of an image as an ndarray",

@@ -24,2 +24,3 @@ "main": "node-pixels.js",

"tape": "^2.12.3",
"brfs": "^1.2.0",
"browserify": "^3.44.0",

@@ -30,3 +31,3 @@ "beefy": "^1.1.0"

"test": "tap test/*.js",
"test-browser": "beefy --open --cwd test test.js"
"test-browser": "beefy test/test.js --open -- -t brfs"
},

@@ -33,0 +34,0 @@ "repository": {

@@ -34,4 +34,4 @@ get-pixels

* `url` is the path to the file. It can be a relative path, an http url, or a data url
* `type` is an optional mime type for the image
* `url` is the path to the file. It can be a relative path, an http url, a data url, or an [in-memory Buffer](http://nodejs.org/api/buffer.html).
* `type` is an optional mime type for the image (required when using a Buffer)
* `cb(err, pixels)` is a callback which gets triggered once the image is loaded.

@@ -45,2 +45,2 @@

=======
(c) 2013-2014 Mikola Lysenko. MIT License
(c) 2013-2014 Mikola Lysenko. MIT License
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc