@jimp/plugin-dither
Advanced tools
Comparing version 0.20.2 to 0.21.0--canary.1149.3239903.0
@@ -6,6 +6,4 @@ "use strict"; | ||
}); | ||
exports["default"] = void 0; | ||
exports.default = void 0; | ||
var _utils = require("@jimp/utils"); | ||
/** | ||
@@ -17,6 +15,6 @@ * Apply a ordered dithering effect | ||
function dither(cb) { | ||
var rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6]; | ||
const rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6]; | ||
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) { | ||
var thresholdId = ((y & 3) << 2) + x % 4; | ||
var dither = rgb565Matrix[thresholdId]; | ||
const thresholdId = ((y & 3) << 2) + x % 4; | ||
const dither = rgb565Matrix[thresholdId]; | ||
this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff); | ||
@@ -26,19 +24,13 @@ this.bitmap.data[idx + 1] = Math.min(this.bitmap.data[idx + 1] + dither, 0xff); | ||
}); | ||
if ((0, _utils.isNodePattern)(cb)) { | ||
cb.call(this, null, this); | ||
} | ||
return this; | ||
} | ||
var _default = function _default() { | ||
return { | ||
dither565: dither, | ||
dither16: dither | ||
}; | ||
}; | ||
exports["default"] = _default; | ||
var _default = () => ({ | ||
dither565: dither, | ||
dither16: dither | ||
}); | ||
exports.default = _default; | ||
module.exports = exports.default; | ||
//# sourceMappingURL=index.js.map |
@@ -1,10 +0,3 @@ | ||
"use strict"; | ||
import { isNodePattern } from "@jimp/utils"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _utils = require("@jimp/utils"); | ||
/** | ||
@@ -16,6 +9,6 @@ * Apply a ordered dithering effect | ||
function dither(cb) { | ||
var rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6]; | ||
const rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6]; | ||
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) { | ||
var thresholdId = ((y & 3) << 2) + x % 4; | ||
var dither = rgb565Matrix[thresholdId]; | ||
const thresholdId = ((y & 3) << 2) + x % 4; | ||
const dither = rgb565Matrix[thresholdId]; | ||
this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff); | ||
@@ -25,18 +18,11 @@ this.bitmap.data[idx + 1] = Math.min(this.bitmap.data[idx + 1] + dither, 0xff); | ||
}); | ||
if ((0, _utils.isNodePattern)(cb)) { | ||
if (isNodePattern(cb)) { | ||
cb.call(this, null, this); | ||
} | ||
return this; | ||
} | ||
var _default = function _default() { | ||
return { | ||
dither565: dither, | ||
dither16: dither | ||
}; | ||
}; | ||
exports["default"] = _default; | ||
export default (() => ({ | ||
dither565: dither, | ||
dither16: dither | ||
})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@jimp/plugin-dither", | ||
"version": "0.20.2", | ||
"version": "0.21.0--canary.1149.3239903.0", | ||
"description": "Dither an image.", | ||
@@ -21,4 +21,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@babel/runtime": "^7.7.2", | ||
"@jimp/utils": "^0.20.2" | ||
"@jimp/utils": "0.21.0--canary.1149.3239903.0" | ||
}, | ||
@@ -31,3 +30,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "cebbdb72f889102a8e3c42b25ad3243b16e3a485" | ||
"gitHead": "323990352ce279d67297aed097b37bd8ec66ef51" | ||
} |
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
2
12758
97
+ Added@jimp/utils@0.21.0--canary.1149.3239903.0(transitive)
- Removed@babel/runtime@^7.7.2
- Removed@babel/runtime@7.26.0(transitive)
- Removed@jimp/utils@0.20.2(transitive)
- Removedregenerator-runtime@0.14.1(transitive)