yeet
This commit is contained in:
23
node_modules/@jimp/plugin-dither/CHANGELOG.md
generated
vendored
Normal file
23
node_modules/@jimp/plugin-dither/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# v0.11.0 (Fri May 15 2020)
|
||||
|
||||
#### 🚀 Enhancement
|
||||
|
||||
- Removed Core-JS as a dependency. [#882](https://github.com/oliver-moran/jimp/pull/882) ([@EricRabil](https://github.com/EricRabil))
|
||||
|
||||
#### Authors: 1
|
||||
|
||||
- Eric Rabil ([@EricRabil](https://github.com/EricRabil))
|
||||
|
||||
---
|
||||
|
||||
# v0.9.3 (Tue Nov 26 2019)
|
||||
|
||||
#### 🐛 Bug Fix
|
||||
|
||||
- `@jimp/cli`, `@jimp/core`, `@jimp/custom`, `jimp`, `@jimp/plugin-blit`, `@jimp/plugin-blur`, `@jimp/plugin-circle`, `@jimp/plugin-color`, `@jimp/plugin-contain`, `@jimp/plugin-cover`, `@jimp/plugin-crop`, `@jimp/plugin-displace`, `@jimp/plugin-dither`, `@jimp/plugin-fisheye`, `@jimp/plugin-flip`, `@jimp/plugin-gaussian`, `@jimp/plugin-invert`, `@jimp/plugin-mask`, `@jimp/plugin-normalize`, `@jimp/plugin-print`, `@jimp/plugin-resize`, `@jimp/plugin-rotate`, `@jimp/plugin-scale`, `@jimp/plugin-shadow`, `@jimp/plugin-threshold`, `@jimp/plugins`, `@jimp/test-utils`, `@jimp/bmp`, `@jimp/gif`, `@jimp/jpeg`, `@jimp/png`, `@jimp/tiff`, `@jimp/types`, `@jimp/utils`
|
||||
- Fix regeneratorRuntime errors [#815](https://github.com/oliver-moran/jimp/pull/815) ([@crutchcorn](https://github.com/crutchcorn) [@hipstersmoothie](https://github.com/hipstersmoothie))
|
||||
|
||||
#### Authors: 2
|
||||
|
||||
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
||||
- Corbin Crutchley ([@crutchcorn](https://github.com/crutchcorn))
|
21
node_modules/@jimp/plugin-dither/LICENSE
generated
vendored
Normal file
21
node_modules/@jimp/plugin-dither/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Oliver Moran
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
26
node_modules/@jimp/plugin-dither/README.md
generated
vendored
Normal file
26
node_modules/@jimp/plugin-dither/README.md
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<div align="center">
|
||||
<img width="200" height="200"
|
||||
src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
|
||||
<h1>@jimp/plugin-dither</h1>
|
||||
<p>Apply a dither effect to an image.</p>
|
||||
</div>
|
||||
|
||||
> Dither - is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is often one of the last stages of mastering audio to a CD.
|
||||
|
||||
## Usage
|
||||
|
||||
Apply a ordered dithering effect
|
||||
|
||||
- @param {function(Error, Jimp)} cb (optional) a callback for when complete
|
||||
|
||||
```js
|
||||
import jimp from 'jimp';
|
||||
|
||||
async function main() {
|
||||
const image = await jimp.read('test/image.png');
|
||||
|
||||
image.dither565();
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
41
node_modules/@jimp/plugin-dither/dist/index.js
generated
vendored
Normal file
41
node_modules/@jimp/plugin-dither/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _utils = require("@jimp/utils");
|
||||
|
||||
/**
|
||||
* Apply a ordered dithering effect
|
||||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
|
||||
* @returns {Jimp} this for chaining of methods
|
||||
*/
|
||||
function dither(cb) {
|
||||
var 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];
|
||||
this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff);
|
||||
this.bitmap.data[idx + 1] = Math.min(this.bitmap.data[idx + 1] + dither, 0xff);
|
||||
this.bitmap.data[idx + 2] = Math.min(this.bitmap.data[idx + 2] + 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;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@jimp/plugin-dither/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@jimp/plugin-dither/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/index.js"],"names":["dither","cb","rgb565Matrix","scanQuiet","bitmap","width","height","x","y","idx","thresholdId","data","Math","min","call","dither565","dither16"],"mappings":";;;;;;;AAAA;;AAEA;;;;;AAKA,SAASA,MAAT,CAAgBC,EAAhB,EAAoB;AAClB,MAAMC,YAAY,GAAG,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,EAAV,EAAc,EAAd,EAAkB,CAAlB,EAAqB,EAArB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,EAA/B,EAAmC,CAAnC,EAAsC,EAAtC,EAA0C,EAA1C,EAA8C,CAA9C,EAAiD,EAAjD,EAAqD,CAArD,CAArB;AACA,OAAKC,SAAL,CAAe,CAAf,EAAkB,CAAlB,EAAqB,KAAKC,MAAL,CAAYC,KAAjC,EAAwC,KAAKD,MAAL,CAAYE,MAApD,EAA4D,UAC1DC,CAD0D,EAE1DC,CAF0D,EAG1DC,GAH0D,EAI1D;AACA,QAAMC,WAAW,GAAG,CAAC,CAACF,CAAC,GAAG,CAAL,KAAW,CAAZ,IAAkBD,CAAC,GAAG,CAA1C;AACA,QAAMP,MAAM,GAAGE,YAAY,CAACQ,WAAD,CAA3B;AACA,SAAKN,MAAL,CAAYO,IAAZ,CAAiBF,GAAjB,IAAwBG,IAAI,CAACC,GAAL,CAAS,KAAKT,MAAL,CAAYO,IAAZ,CAAiBF,GAAjB,IAAwBT,MAAjC,EAAyC,IAAzC,CAAxB;AACA,SAAKI,MAAL,CAAYO,IAAZ,CAAiBF,GAAG,GAAG,CAAvB,IAA4BG,IAAI,CAACC,GAAL,CAC1B,KAAKT,MAAL,CAAYO,IAAZ,CAAiBF,GAAG,GAAG,CAAvB,IAA4BT,MADF,EAE1B,IAF0B,CAA5B;AAIA,SAAKI,MAAL,CAAYO,IAAZ,CAAiBF,GAAG,GAAG,CAAvB,IAA4BG,IAAI,CAACC,GAAL,CAC1B,KAAKT,MAAL,CAAYO,IAAZ,CAAiBF,GAAG,GAAG,CAAvB,IAA4BT,MADF,EAE1B,IAF0B,CAA5B;AAID,GAhBD;;AAkBA,MAAI,0BAAcC,EAAd,CAAJ,EAAuB;AACrBA,IAAAA,EAAE,CAACa,IAAH,CAAQ,IAAR,EAAc,IAAd,EAAoB,IAApB;AACD;;AAED,SAAO,IAAP;AACD;;eAEc;AAAA,SAAO;AACpBC,IAAAA,SAAS,EAAEf,MADS;AAEpBgB,IAAAA,QAAQ,EAAEhB;AAFU,GAAP;AAAA,C","sourcesContent":["import { isNodePattern } from '@jimp/utils';\n\n/**\n * Apply a ordered dithering effect\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nfunction dither(cb) {\n const rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6];\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(\n x,\n y,\n idx\n ) {\n const thresholdId = ((y & 3) << 2) + (x % 4);\n const dither = rgb565Matrix[thresholdId];\n this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff);\n this.bitmap.data[idx + 1] = Math.min(\n this.bitmap.data[idx + 1] + dither,\n 0xff\n );\n this.bitmap.data[idx + 2] = Math.min(\n this.bitmap.data[idx + 2] + dither,\n 0xff\n );\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n}\n\nexport default () => ({\n dither565: dither,\n dither16: dither\n});\n"],"file":"index.js"}
|
40
node_modules/@jimp/plugin-dither/es/index.js
generated
vendored
Normal file
40
node_modules/@jimp/plugin-dither/es/index.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _utils = require("@jimp/utils");
|
||||
|
||||
/**
|
||||
* Apply a ordered dithering effect
|
||||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
|
||||
* @returns {Jimp} this for chaining of methods
|
||||
*/
|
||||
function dither(cb) {
|
||||
var 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];
|
||||
this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff);
|
||||
this.bitmap.data[idx + 1] = Math.min(this.bitmap.data[idx + 1] + dither, 0xff);
|
||||
this.bitmap.data[idx + 2] = Math.min(this.bitmap.data[idx + 2] + 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;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@jimp/plugin-dither/es/index.js.map
generated
vendored
Normal file
1
node_modules/@jimp/plugin-dither/es/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/index.js"],"names":["dither","cb","rgb565Matrix","scanQuiet","bitmap","width","height","x","y","idx","thresholdId","data","Math","min","call","dither565","dither16"],"mappings":";;;;;;;AAAA;;AAEA;;;;;AAKA,SAASA,MAAT,CAAgBC,EAAhB,EAAoB;AAClB,MAAMC,YAAY,GAAG,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,EAAV,EAAc,EAAd,EAAkB,CAAlB,EAAqB,EAArB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,EAA/B,EAAmC,CAAnC,EAAsC,EAA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effect\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nfunction dither(cb) {\n const rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6];\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(\n x,\n y,\n idx\n ) {\n const thresholdId = ((y & 3) << 2) + (x % 4);\n const dither = rgb565Matrix[thresholdId];\n this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff);\n this.bitmap.data[idx + 1] = Math.min(\n this.bitmap.data[idx + 1] + dither,\n 0xff\n );\n this.bitmap.data[idx + 2] = Math.min(\n this.bitmap.data[idx + 2] + dither,\n 0xff\n );\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n}\n\nexport default () => ({\n dither565: dither,\n dither16: dither\n});\n"],"file":"index.js"}
|
8
node_modules/@jimp/plugin-dither/index.d.ts
generated
vendored
Normal file
8
node_modules/@jimp/plugin-dither/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import { ImageCallback } from '@jimp/core';
|
||||
|
||||
interface Dither {
|
||||
dither565(cb?: ImageCallback<this>): this;
|
||||
dither16(cb?: ImageCallback<this>): this;
|
||||
}
|
||||
|
||||
export default function(): Dither;
|
30
node_modules/@jimp/plugin-dither/package.json
generated
vendored
Normal file
30
node_modules/@jimp/plugin-dither/package.json
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "@jimp/plugin-dither",
|
||||
"version": "0.12.1",
|
||||
"description": "Dither an image.",
|
||||
"main": "dist/index.js",
|
||||
"module": "es/index.js",
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"build": "npm run build:node:production && npm run build:module",
|
||||
"build:watch": "npm run build:node:debug -- -- --watch --verbose",
|
||||
"build:debug": "npm run build:node:debug",
|
||||
"build:module": "cross-env BABEL_ENV=module babel src -d es --source-maps --config-file ../../babel.config.js",
|
||||
"build:node": "babel src -d dist --source-maps --config-file ../../babel.config.js",
|
||||
"build:node:debug": "cross-env BABEL_ENV=development npm run build:node",
|
||||
"build:node:production": "cross-env BABEL_ENV=production npm run build:node"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.2",
|
||||
"@jimp/utils": "^0.12.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@jimp/custom": ">=0.3.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "942e635564e36fc243767531b4f8be036afa40b5"
|
||||
}
|
38
node_modules/@jimp/plugin-dither/src/index.js
generated
vendored
Normal file
38
node_modules/@jimp/plugin-dither/src/index.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
import { isNodePattern } from '@jimp/utils';
|
||||
|
||||
/**
|
||||
* Apply a ordered dithering effect
|
||||
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
|
||||
* @returns {Jimp} this for chaining of methods
|
||||
*/
|
||||
function dither(cb) {
|
||||
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
|
||||
) {
|
||||
const thresholdId = ((y & 3) << 2) + (x % 4);
|
||||
const dither = rgb565Matrix[thresholdId];
|
||||
this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff);
|
||||
this.bitmap.data[idx + 1] = Math.min(
|
||||
this.bitmap.data[idx + 1] + dither,
|
||||
0xff
|
||||
);
|
||||
this.bitmap.data[idx + 2] = Math.min(
|
||||
this.bitmap.data[idx + 2] + dither,
|
||||
0xff
|
||||
);
|
||||
});
|
||||
|
||||
if (isNodePattern(cb)) {
|
||||
cb.call(this, null, this);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
export default () => ({
|
||||
dither565: dither,
|
||||
dither16: dither
|
||||
});
|
Reference in New Issue
Block a user