Add: node_modules
This commit is contained in:
21
app/node_modules/@jimp/tiff/LICENSE
generated
vendored
Normal file
21
app/node_modules/@jimp/tiff/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.
|
6
app/node_modules/@jimp/tiff/README.md
generated
vendored
Normal file
6
app/node_modules/@jimp/tiff/README.md
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<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/tiff</h1>
|
||||
<p>Default Jimp tiff encoder/decoder.</p>
|
||||
</div>
|
49
app/node_modules/@jimp/tiff/dist/index.js
generated
vendored
Normal file
49
app/node_modules/@jimp/tiff/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
require("core-js/modules/es6.object.define-property");
|
||||
|
||||
var _utif = _interopRequireDefault(require("utif"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
var MIME_TYPE = 'image/tiff';
|
||||
|
||||
var _default = function _default() {
|
||||
return {
|
||||
mime: _defineProperty({}, MIME_TYPE, ['tiff', 'tif']),
|
||||
constants: {
|
||||
MIME_TIFF: MIME_TYPE
|
||||
},
|
||||
decoders: _defineProperty({}, MIME_TYPE, function (data) {
|
||||
var ifds = _utif.default.decode(data);
|
||||
|
||||
var page = ifds[0];
|
||||
|
||||
_utif.default.decodeImages(data, ifds);
|
||||
|
||||
var rgba = _utif.default.toRGBA8(page);
|
||||
|
||||
return {
|
||||
data: Buffer.from(rgba),
|
||||
width: page.t256[0],
|
||||
height: page.t257[0]
|
||||
};
|
||||
}),
|
||||
encoders: _defineProperty({}, MIME_TYPE, function (image) {
|
||||
var tiff = _utif.default.encodeImage(image.bitmap.data, image.bitmap.width, image.bitmap.height);
|
||||
|
||||
return Buffer.from(tiff);
|
||||
})
|
||||
};
|
||||
};
|
||||
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=index.js.map
|
1
app/node_modules/@jimp/tiff/dist/index.js.map
generated
vendored
Normal file
1
app/node_modules/@jimp/tiff/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/index.js"],"names":["MIME_TYPE","mime","constants","MIME_TIFF","decoders","data","ifds","UTIF","decode","page","decodeImages","rgba","toRGBA8","Buffer","from","width","t256","height","t257","encoders","image","tiff","encodeImage","bitmap"],"mappings":";;;;;;;;;AAAA;;;;;;AAEA,IAAMA,SAAS,GAAG,YAAlB;;eAEe;AAAA,SAAO;AACpBC,IAAAA,IAAI,sBAAKD,SAAL,EAAiB,CAAC,MAAD,EAAS,KAAT,CAAjB,CADgB;AAGpBE,IAAAA,SAAS,EAAE;AACTC,MAAAA,SAAS,EAAEH;AADF,KAHS;AAOpBI,IAAAA,QAAQ,sBACLJ,SADK,EACO,UAAAK,IAAI,EAAI;AACnB,UAAMC,IAAI,GAAGC,cAAKC,MAAL,CAAYH,IAAZ,CAAb;;AACA,UAAMI,IAAI,GAAGH,IAAI,CAAC,CAAD,CAAjB;;AACAC,oBAAKG,YAAL,CAAkBL,IAAlB,EAAwBC,IAAxB;;AACA,UAAMK,IAAI,GAAGJ,cAAKK,OAAL,CAAaH,IAAb,CAAb;;AAEA,aAAO;AACLJ,QAAAA,IAAI,EAAEQ,MAAM,CAACC,IAAP,CAAYH,IAAZ,CADD;AAELI,QAAAA,KAAK,EAAEN,IAAI,CAACO,IAAL,CAAU,CAAV,CAFF;AAGLC,QAAAA,MAAM,EAAER,IAAI,CAACS,IAAL,CAAU,CAAV;AAHH,OAAP;AAKD,KAZK,CAPY;AAsBpBC,IAAAA,QAAQ,sBACLnB,SADK,EACO,UAAAoB,KAAK,EAAI;AACpB,UAAMC,IAAI,GAAGd,cAAKe,WAAL,CACXF,KAAK,CAACG,MAAN,CAAalB,IADF,EAEXe,KAAK,CAACG,MAAN,CAAaR,KAFF,EAGXK,KAAK,CAACG,MAAN,CAAaN,MAHF,CAAb;;AAMA,aAAOJ,MAAM,CAACC,IAAP,CAAYO,IAAZ,CAAP;AACD,KATK;AAtBY,GAAP;AAAA,C","sourcesContent":["import UTIF from 'utif';\n\nconst MIME_TYPE = 'image/tiff';\n\nexport default () => ({\n mime: { [MIME_TYPE]: ['tiff', 'tif'] },\n\n constants: {\n MIME_TIFF: MIME_TYPE\n },\n\n decoders: {\n [MIME_TYPE]: data => {\n const ifds = UTIF.decode(data);\n const page = ifds[0];\n UTIF.decodeImages(data, ifds);\n const rgba = UTIF.toRGBA8(page);\n\n return {\n data: Buffer.from(rgba),\n width: page.t256[0],\n height: page.t257[0]\n };\n }\n },\n\n encoders: {\n [MIME_TYPE]: image => {\n const tiff = UTIF.encodeImage(\n image.bitmap.data,\n image.bitmap.width,\n image.bitmap.height\n );\n\n return Buffer.from(tiff);\n }\n }\n});\n"],"file":"index.js"}
|
28
app/node_modules/@jimp/tiff/es/index.js
generated
vendored
Normal file
28
app/node_modules/@jimp/tiff/es/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import UTIF from 'utif';
|
||||
var MIME_TYPE = 'image/tiff';
|
||||
export default (function () {
|
||||
return {
|
||||
mime: _defineProperty({}, MIME_TYPE, ['tiff', 'tif']),
|
||||
constants: {
|
||||
MIME_TIFF: MIME_TYPE
|
||||
},
|
||||
decoders: _defineProperty({}, MIME_TYPE, function (data) {
|
||||
var ifds = UTIF.decode(data);
|
||||
var page = ifds[0];
|
||||
UTIF.decodeImages(data, ifds);
|
||||
var rgba = UTIF.toRGBA8(page);
|
||||
return {
|
||||
data: Buffer.from(rgba),
|
||||
width: page.t256[0],
|
||||
height: page.t257[0]
|
||||
};
|
||||
}),
|
||||
encoders: _defineProperty({}, MIME_TYPE, function (image) {
|
||||
var tiff = UTIF.encodeImage(image.bitmap.data, image.bitmap.width, image.bitmap.height);
|
||||
return Buffer.from(tiff);
|
||||
})
|
||||
};
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
1
app/node_modules/@jimp/tiff/es/index.js.map
generated
vendored
Normal file
1
app/node_modules/@jimp/tiff/es/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/index.js"],"names":["UTIF","MIME_TYPE","mime","constants","MIME_TIFF","decoders","data","ifds","decode","page","decodeImages","rgba","toRGBA8","Buffer","from","width","t256","height","t257","encoders","image","tiff","encodeImage","bitmap"],"mappings":";;AAAA,OAAOA,IAAP,MAAiB,MAAjB;AAEA,IAAMC,SAAS,GAAG,YAAlB;AAEA,gBAAe;AAAA,SAAO;AACpBC,IAAAA,IAAI,sBAAKD,SAAL,EAAiB,CAAC,MAAD,EAAS,KAAT,CAAjB,CADgB;AAGpBE,IAAAA,SAAS,EAAE;AACTC,MAAAA,SAAS,EAAEH;AADF,KAHS;AAOpBI,IAAAA,QAAQ,sBACLJ,SADK,EACO,UAAAK,IAAI,EAAI;AACnB,UAAMC,IAAI,GAAGP,IAAI,CAACQ,MAAL,CAAYF,IAAZ,CAAb;AACA,UAAMG,IAAI,GAAGF,IAAI,CAAC,CAAD,CAAjB;AACAP,MAAAA,IAAI,CAACU,YAAL,CAAkBJ,IAAlB,EAAwBC,IAAxB;AACA,UAAMI,IAAI,GAAGX,IAAI,CAACY,OAAL,CAAaH,IAAb,CAAb;AAEA,aAAO;AACLH,QAAAA,IAAI,EAAEO,MAAM,CAACC,IAAP,CAAYH,IAAZ,CADD;AAELI,QAAAA,KAAK,EAAEN,IAAI,CAACO,IAAL,CAAU,CAAV,CAFF;AAGLC,QAAAA,MAAM,EAAER,IAAI,CAACS,IAAL,CAAU,CAAV;AAHH,OAAP;AAKD,KAZK,CAPY;AAsBpBC,IAAAA,QAAQ,sBACLlB,SADK,EACO,UAAAmB,KAAK,EAAI;AACpB,UAAMC,IAAI,GAAGrB,IAAI,CAACsB,WAAL,CACXF,KAAK,CAACG,MAAN,CAAajB,IADF,EAEXc,KAAK,CAACG,MAAN,CAAaR,KAFF,EAGXK,KAAK,CAACG,MAAN,CAAaN,MAHF,CAAb;AAMA,aAAOJ,MAAM,CAACC,IAAP,CAAYO,IAAZ,CAAP;AACD,KATK;AAtBY,GAAP;AAAA,CAAf","sourcesContent":["import UTIF from 'utif';\n\nconst MIME_TYPE = 'image/tiff';\n\nexport default () => ({\n mime: { [MIME_TYPE]: ['tiff', 'tif'] },\n\n constants: {\n MIME_TIFF: MIME_TYPE\n },\n\n decoders: {\n [MIME_TYPE]: data => {\n const ifds = UTIF.decode(data);\n const page = ifds[0];\n UTIF.decodeImages(data, ifds);\n const rgba = UTIF.toRGBA8(page);\n\n return {\n data: Buffer.from(rgba),\n width: page.t256[0],\n height: page.t257[0]\n };\n }\n },\n\n encoders: {\n [MIME_TYPE]: image => {\n const tiff = UTIF.encodeImage(\n image.bitmap.data,\n image.bitmap.width,\n image.bitmap.height\n );\n\n return Buffer.from(tiff);\n }\n }\n});\n"],"file":"index.js"}
|
65
app/node_modules/@jimp/tiff/package.json
generated
vendored
Normal file
65
app/node_modules/@jimp/tiff/package.json
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@jimp/tiff@0.6.4",
|
||||
"C:\\Users\\ryuki\\TheDesk\\app"
|
||||
]
|
||||
],
|
||||
"_from": "@jimp/tiff@0.6.4",
|
||||
"_id": "@jimp/tiff@0.6.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-8/vD4qleexmhPdppiu6fSstj/n/kGNTn8iIlf1emiqOuMN2PL9q5GOPDWU0xWdGNyJMMIDXJPgUFUkKfqXdg7w==",
|
||||
"_location": "/@jimp/tiff",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@jimp/tiff@0.6.4",
|
||||
"name": "@jimp/tiff",
|
||||
"escapedName": "@jimp%2ftiff",
|
||||
"scope": "@jimp",
|
||||
"rawSpec": "0.6.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.6.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@jimp/types"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.6.4.tgz",
|
||||
"_spec": "0.6.4",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\app",
|
||||
"author": "",
|
||||
"dependencies": {
|
||||
"core-js": "^2.5.7",
|
||||
"utif": "^2.0.1"
|
||||
},
|
||||
"description": "Default Jimp tiff encoder/decoder.",
|
||||
"devDependencies": {
|
||||
"@jimp/custom": "^0.6.4",
|
||||
"@jimp/test-utils": "^0.6.4"
|
||||
},
|
||||
"gitHead": "7c9d3c817cade88d4a20422be10670d3c1528429",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"module": "es/index.js",
|
||||
"name": "@jimp/tiff",
|
||||
"peerDependencies": {
|
||||
"@jimp/custom": ">=0.3.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:node:production && npm run build:module",
|
||||
"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",
|
||||
"build:watch": "npm run build:node:debug -- -- --watch --verbose",
|
||||
"test": "cross-env BABEL_ENV=test mocha --require @babel/register",
|
||||
"test:coverage": "nyc npm run test",
|
||||
"test:watch": "npm run test -- --reporter min --watch"
|
||||
},
|
||||
"version": "0.6.4"
|
||||
}
|
38
app/node_modules/@jimp/tiff/src/index.js
generated
vendored
Normal file
38
app/node_modules/@jimp/tiff/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import UTIF from 'utif';
|
||||
|
||||
const MIME_TYPE = 'image/tiff';
|
||||
|
||||
export default () => ({
|
||||
mime: { [MIME_TYPE]: ['tiff', 'tif'] },
|
||||
|
||||
constants: {
|
||||
MIME_TIFF: MIME_TYPE
|
||||
},
|
||||
|
||||
decoders: {
|
||||
[MIME_TYPE]: data => {
|
||||
const ifds = UTIF.decode(data);
|
||||
const page = ifds[0];
|
||||
UTIF.decodeImages(data, ifds);
|
||||
const rgba = UTIF.toRGBA8(page);
|
||||
|
||||
return {
|
||||
data: Buffer.from(rgba),
|
||||
width: page.t256[0],
|
||||
height: page.t257[0]
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
encoders: {
|
||||
[MIME_TYPE]: image => {
|
||||
const tiff = UTIF.encodeImage(
|
||||
image.bitmap.data,
|
||||
image.bitmap.width,
|
||||
image.bitmap.height
|
||||
);
|
||||
|
||||
return Buffer.from(tiff);
|
||||
}
|
||||
}
|
||||
});
|
BIN
app/node_modules/@jimp/tiff/test/images/rgb.tiff
generated
vendored
Normal file
BIN
app/node_modules/@jimp/tiff/test/images/rgb.tiff
generated
vendored
Normal file
Binary file not shown.
43
app/node_modules/@jimp/tiff/test/tiff.test.js
generated
vendored
Normal file
43
app/node_modules/@jimp/tiff/test/tiff.test.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/* eslint-disable no-control-regex */
|
||||
|
||||
import { Jimp, getTestDir } from '@jimp/test-utils';
|
||||
import configure from '@jimp/custom';
|
||||
|
||||
import tiff from '../src';
|
||||
|
||||
const jimp = configure({ types: [tiff] }, Jimp);
|
||||
|
||||
describe('TIFF', () => {
|
||||
const imagesDir = getTestDir(__dirname) + '/images';
|
||||
|
||||
it('load TIFF', async () => {
|
||||
const image = await jimp.read(imagesDir + '/rgb.tiff');
|
||||
|
||||
image.getPixelColor(10, 10).should.be.equal(0xa4988bff);
|
||||
image.getPixelColor(220, 190).should.be.equal(0xe0d7ddff);
|
||||
image.getPixelColor(350, 130).should.be.equal(0x565433ff);
|
||||
});
|
||||
|
||||
const simpleJGD = {
|
||||
width: 3,
|
||||
height: 3,
|
||||
data: [
|
||||
0xff0000ff,
|
||||
0xff0080ff,
|
||||
0xff00ffff,
|
||||
0xff0080ff,
|
||||
0xff00ffff,
|
||||
0x8000ffff,
|
||||
0xff00ffff,
|
||||
0x8000ffff,
|
||||
0x0000ffff
|
||||
]
|
||||
};
|
||||
|
||||
it('export TIFF', async () => {
|
||||
const image = await jimp.read(simpleJGD);
|
||||
const buffer = await image.getBufferAsync('image/tiff');
|
||||
|
||||
buffer.toString().should.match(/^MM\u0000*\u0000/);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user