初始化fy

This commit is contained in:
yziiy
2025-08-11 11:51:38 +08:00
parent 98ce20e897
commit 7e21160e13
19770 changed files with 3108698 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
# 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))

View 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.

View File

@@ -0,0 +1,24 @@
<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-invert</h1>
<p>Invert an image's colors.</p>
</div>
Invert an image's colors.
## Usage
- @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.invert();
}
main();
```

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _utils = require("@jimp/utils");
/**
* Inverts the image
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
* @returns {Jimp} this for chaining of methods
*/
var _default = function _default() {
return {
invert: function invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);
}
return this;
}
};
};
exports["default"] = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/index.js"],"names":["invert","cb","scanQuiet","bitmap","width","height","x","y","idx","data","call"],"mappings":";;;;;;;AAAA;;AAEA;;;;;eAKe;AAAA,SAAO;AACpBA,IAAAA,MADoB,kBACbC,EADa,EACT;AACT,WAAKC,SAAL,CAAe,CAAf,EAAkB,CAAlB,EAAqB,KAAKC,MAAL,CAAYC,KAAjC,EAAwC,KAAKD,MAAL,CAAYE,MAApD,EAA4D,UAC1DC,CAD0D,EAE1DC,CAF0D,EAG1DC,GAH0D,EAI1D;AACA,aAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAjB,IAAwB,MAAM,KAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAjB,CAA9B;AACA,aAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,IAA4B,MAAM,KAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,CAAlC;AACA,aAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,IAA4B,MAAM,KAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,CAAlC;AACD,OARD;;AAUA,UAAI,0BAAcP,EAAd,CAAJ,EAAuB;AACrBA,QAAAA,EAAE,CAACS,IAAH,CAAQ,IAAR,EAAc,IAAd,EAAoB,IAApB;AACD;;AAED,aAAO,IAAP;AACD;AAjBmB,GAAP;AAAA,C","sourcesContent":["import { isNodePattern } from '@jimp/utils';\n\n/**\n * Inverts the image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nexport default () => ({\n invert(cb) {\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(\n x,\n y,\n idx\n ) {\n this.bitmap.data[idx] = 255 - this.bitmap.data[idx];\n this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];\n this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n }\n});\n"],"file":"index.js"}

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _utils = require("@jimp/utils");
/**
* Inverts the image
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
* @returns {Jimp} this for chaining of methods
*/
var _default = function _default() {
return {
invert: function invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);
}
return this;
}
};
};
exports["default"] = _default;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/index.js"],"names":["invert","cb","scanQuiet","bitmap","width","height","x","y","idx","data","call"],"mappings":";;;;;;;AAAA;;AAEA;;;;;eAKe;AAAA,SAAO;AACpBA,IAAAA,MADoB,kBACbC,EADa,EACT;AACT,WAAKC,SAAL,CAAe,CAAf,EAAkB,CAAlB,EAAqB,KAAKC,MAAL,CAAYC,KAAjC,EAAwC,KAAKD,MAAL,CAAYE,MAApD,EAA4D,UAC1DC,CAD0D,EAE1DC,CAF0D,EAG1DC,GAH0D,EAI1D;AACA,aAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAjB,IAAwB,MAAM,KAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAjB,CAA9B;AACA,aAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,IAA4B,MAAM,KAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,CAAlC;AACA,aAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,IAA4B,MAAM,KAAKL,MAAL,CAAYM,IAAZ,CAAiBD,GAAG,GAAG,CAAvB,CAAlC;AACD,OARD;;AAUA,UAAI,0BAAcP,EAAd,CAAJ,EAAuB;AACrBA,QAAAA,EAAE,CAACS,IAAH,CAAQ,IAAR,EAAc,IAAd,EAAoB,IAApB;AACD;;AAED,aAAO,IAAP;AACD;AAjBmB,GAAP;AAAA,C","sourcesContent":["import { isNodePattern } from '@jimp/utils';\n\n/**\n * Inverts the image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nexport default () => ({\n invert(cb) {\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(\n x,\n y,\n idx\n ) {\n this.bitmap.data[idx] = 255 - this.bitmap.data[idx];\n this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];\n this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n }\n});\n"],"file":"index.js"}

View File

@@ -0,0 +1,7 @@
import { ImageCallback } from '@jimp/core';
interface Invert {
invert(cb?: ImageCallback<this>): this;
}
export default function(): Invert;

View File

@@ -0,0 +1,31 @@
{
"name": "@jimp/plugin-invert",
"version": "0.10.3",
"description": "invert 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.10.3",
"core-js": "^3.4.1"
},
"peerDependencies": {
"@jimp/custom": ">=0.3.5"
},
"publishConfig": {
"access": "public"
},
"gitHead": "37197106eae5c26231018dfdc0254422f6b43927"
}

View File

@@ -0,0 +1,26 @@
import { isNodePattern } from '@jimp/utils';
/**
* Inverts the image
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
* @returns {Jimp} this for chaining of methods
*/
export default () => ({
invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
x,
y,
idx
) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if (isNodePattern(cb)) {
cb.call(this, null, this);
}
return this;
}
});