@jimp/core
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -414,3 +414,3 @@ "use strict"; | ||
_imageBitmap.parseBitmap.call(_assertThisInitialized(_assertThisInitialized(_this)), data, path, finish); | ||
_this.parseBitmap(data, path, finish); | ||
}); | ||
@@ -426,3 +426,3 @@ } else if (_typeof(args[0]) === 'object' && Buffer.isBuffer(args[0])) { | ||
_imageBitmap.parseBitmap.call(_assertThisInitialized(_assertThisInitialized(_this)), data, null, finish); | ||
_this.parseBitmap(data, null, finish); | ||
} else { | ||
@@ -462,6 +462,8 @@ // Allow client libs to add new ways to build a Jimp object. | ||
/** | ||
* Sets the type of the image (RGB or RGBA) when saving in a format that supports transparency (default is RGBA) | ||
* @param {boolean} bool A Boolean, true to use RGBA or false to use RGB | ||
* Parse a bitmap with the loaded image types. | ||
* | ||
* @param {Buffer} data raw image data | ||
* @param {string} path optional path to file | ||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete | ||
* @returns {Jimp} this for chaining of methods | ||
* @memberof Jimp | ||
*/ | ||
@@ -471,2 +473,14 @@ | ||
_createClass(Jimp, [{ | ||
key: "parseBitmap", | ||
value: function parseBitmap(data, path, finish) { | ||
_imageBitmap.parseBitmap.call(this, data, null, finish); | ||
} | ||
/** | ||
* Sets the type of the image (RGB or RGBA) when saving in a format that supports transparency (default is RGBA) | ||
* @param {boolean} bool A Boolean, true to use RGBA or false to use RGB | ||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete | ||
* @returns {Jimp} this for chaining of methods | ||
*/ | ||
}, { | ||
key: "rgba", | ||
@@ -473,0 +487,0 @@ value: function rgba(bool, cb) { |
@@ -46,3 +46,3 @@ function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
import * as MIME from './utils/mime'; | ||
import { parseBitmap, getBuffer, getBufferAsync } from './utils/image-bitmap'; | ||
import { parseBitmap as _parseBitmap, getBuffer, getBufferAsync } from './utils/image-bitmap'; | ||
import * as constants from './constants'; | ||
@@ -333,3 +333,3 @@ var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'; // an array storing the maximum string length of hashes at various bases | ||
parseBitmap.call(_assertThisInitialized(_assertThisInitialized(_this)), data, path, finish); | ||
_this.parseBitmap(data, path, finish); | ||
}); | ||
@@ -345,3 +345,3 @@ } else if (_typeof(args[0]) === 'object' && Buffer.isBuffer(args[0])) { | ||
parseBitmap.call(_assertThisInitialized(_assertThisInitialized(_this)), data, null, finish); | ||
_this.parseBitmap(data, null, finish); | ||
} else { | ||
@@ -381,6 +381,8 @@ // Allow client libs to add new ways to build a Jimp object. | ||
/** | ||
* Sets the type of the image (RGB or RGBA) when saving in a format that supports transparency (default is RGBA) | ||
* @param {boolean} bool A Boolean, true to use RGBA or false to use RGB | ||
* Parse a bitmap with the loaded image types. | ||
* | ||
* @param {Buffer} data raw image data | ||
* @param {string} path optional path to file | ||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete | ||
* @returns {Jimp} this for chaining of methods | ||
* @memberof Jimp | ||
*/ | ||
@@ -390,2 +392,14 @@ | ||
_createClass(Jimp, [{ | ||
key: "parseBitmap", | ||
value: function parseBitmap(data, path, finish) { | ||
_parseBitmap.call(this, data, null, finish); | ||
} | ||
/** | ||
* Sets the type of the image (RGB or RGBA) when saving in a format that supports transparency (default is RGBA) | ||
* @param {boolean} bool A Boolean, true to use RGBA or false to use RGB | ||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete | ||
* @returns {Jimp} this for chaining of methods | ||
*/ | ||
}, { | ||
key: "rgba", | ||
@@ -392,0 +406,0 @@ value: function rgba(bool, cb) { |
{ | ||
"name": "@jimp/core", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Jimp core", | ||
@@ -54,3 +54,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "fbbe0b7da5a9dcf8da35e2dfb2e8265ca850435c" | ||
"gitHead": "b23ab92550336eed5d4ac422564c7c63ea280c73" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369801
3375