Comparing version 0.5.1 to 0.5.2
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -38,3 +38,4 @@ This software is released under the MIT License. | ||
this.globalColorTable = GifColor_1.GifColor.createColorTable([ | ||
new GifColor_1.GifColor(0, 0, 0), new GifColor_1.GifColor(255, 255, 255) | ||
new GifColor_1.GifColor(0, 0, 0), | ||
new GifColor_1.GifColor(255, 255, 255) | ||
]); | ||
@@ -172,3 +173,4 @@ } | ||
packed |= gif.colorResolution; // not supported | ||
if (gif.sortFlag) { // not supported | ||
if (gif.sortFlag) { | ||
// not supported | ||
packed |= 8; | ||
@@ -251,3 +253,5 @@ } | ||
else { | ||
compressedBytes = compressedBytes || new Uint8Array(compressWithLZW(frame.pixelData, frame.lzwCode)); | ||
compressedBytes = | ||
compressedBytes || | ||
new Uint8Array(compressWithLZW(frame.pixelData, frame.lzwCode)); | ||
} | ||
@@ -404,7 +408,7 @@ var l = compressedBytes.length; | ||
while (numBits > 0) { | ||
this.__remVal = ((code << this.__remNumBits) & 0xFF) + this.__remVal; | ||
this.__remVal = ((code << this.__remNumBits) & 0xff) + this.__remVal; | ||
if (numBits + this.__remNumBits >= 8) { | ||
this.__out.push(this.__remVal); | ||
numBits = numBits - (8 - this.__remNumBits); | ||
code = (code >> (8 - this.__remNumBits)); | ||
code = code >> (8 - this.__remNumBits); | ||
this.__remVal = 0; | ||
@@ -441,3 +445,3 @@ this.__remNumBits = 0; | ||
// output a Clear code as the first code of each image data stream. | ||
var clearCode = (1 << numBits); | ||
var clearCode = 1 << numBits; | ||
// GIF spec says: An End of Information code is defined that explicitly | ||
@@ -470,5 +474,5 @@ // indicates the end of the image data stream. LZW processing terminates | ||
// GIF spec defines a maximum code value of 4095 (0xFFF) | ||
if (nextCode <= 0xFFF) { | ||
if (nextCode <= 0xfff) { | ||
dict[concatedCodesKey] = nextCode; | ||
if (nextCode === (1 << curNumCodeBits)) | ||
if (nextCode === 1 << curNumCodeBits) | ||
curNumCodeBits++; | ||
@@ -475,0 +479,0 @@ nextCode++; |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -19,5 +19,5 @@ This software is released under the MIT License. | ||
/** TODO | ||
static valueOf(color:string) { | ||
} | ||
*/ | ||
static valueOf(color:string) { | ||
} | ||
*/ | ||
GifColor.createColorTable = function (colors) { | ||
@@ -24,0 +24,0 @@ var numbers = []; |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -89,3 +89,3 @@ This software is released under the MIT License. | ||
if (code !== dict.length) | ||
throw new Error('Invalid LZW code.'); | ||
throw new Error("Invalid LZW code."); | ||
dict.push(dict[last].concat(dict[last][0])); | ||
@@ -95,3 +95,3 @@ } | ||
offset += dict[code].length; | ||
if (dict.length === (1 << codeSize) && codeSize < 12) { | ||
if (dict.length === 1 << codeSize && codeSize < 12) { | ||
// If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long. | ||
@@ -98,0 +98,0 @@ codeSize++; |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -5,0 +5,0 @@ This software is released under the MIT License. |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -5,0 +5,0 @@ This software is released under the MIT License. |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -5,0 +5,0 @@ This software is released under the MIT License. |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -5,0 +5,0 @@ This software is released under the MIT License. |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -18,3 +18,3 @@ This software is released under the MIT License. | ||
GifPresenter.writeToBlob = function (bytes) { | ||
return new Blob(bytes, { "type": "image/gif" }); | ||
return new Blob(bytes, { type: "image/gif" }); | ||
}; | ||
@@ -21,0 +21,0 @@ /** |
"use strict"; | ||
/*! | ||
gifken v0.5.0 | ||
gifken | ||
Copyright (c) 2013 aaharu | ||
@@ -5,0 +5,0 @@ This software is released under the MIT License. |
# Change Log | ||
## [0.5.2] - 2019-03-02 | ||
### Changed | ||
- update devDependencies | ||
- change indent size | ||
- use eslint and prettier | ||
## [0.5.1] - 2018-06-16 | ||
### Changed | ||
- upgrade devDependencies | ||
## 0.5.0 | ||
[0.5.2]: https://github.com/aaharu/gifken/compare/0.5.1...0.5.2 | ||
[0.5.1]: https://github.com/aaharu/gifken/compare/0.5.0...0.5.1 |
{ | ||
"name": "gifken", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "TypeScript / JavaScript GIF parser and maker", | ||
@@ -10,3 +10,3 @@ "main": "build/src/gifken.js", | ||
"test": "rimraf coverage && jest", | ||
"clean": "rimraf build coverage", | ||
"clean": "rimraf build coverage docs", | ||
"doc": "typedoc --target ES2016 --module commonjs --out docs --readme README.md src && node d.js" | ||
@@ -27,12 +27,17 @@ }, | ||
"devDependencies": { | ||
"@types/jest": "^23.1.0", | ||
"@types/jest": "^24.0.9", | ||
"@types/node": "^10.3.3", | ||
"browserify": "^16.2.2", | ||
"codecov": "^3.0.2", | ||
"jest": "^23.1.0", | ||
"@typescript-eslint/eslint-plugin": "^1.4.2", | ||
"browserify": "^16.2.3", | ||
"codecov": "^3.2.0", | ||
"eslint": "^5.14.1", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"jest": "^24.1.0", | ||
"jsdoc": "^3.5.5", | ||
"rimraf": "^2.6.2", | ||
"ts-jest": "^22.4.6", | ||
"typedoc": "^0.11.1", | ||
"typescript": "^2.9.2" | ||
"prettier": "^1.16.4", | ||
"rimraf": "^2.6.3", | ||
"ts-jest": "^24.0.0", | ||
"typedoc": "^0.14.2", | ||
"typescript": "^3.3.3333" | ||
}, | ||
@@ -43,3 +48,4 @@ "files": [ | ||
"keywords": [ | ||
"animated-gif" | ||
"animated-gif", | ||
"gif" | ||
], | ||
@@ -53,3 +59,3 @@ "jest": { | ||
"transform": { | ||
"\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
"\\.(ts|tsx)$": "ts-jest" | ||
}, | ||
@@ -56,0 +62,0 @@ "testMatch": [ |
@@ -8,2 +8,3 @@ # gifken | ||
### Create a GIF image in browser | ||
```html | ||
@@ -49,2 +50,3 @@ <div id="content"></div> | ||
### Split an animated GIF image in browser | ||
```javascript | ||
@@ -113,3 +115,3 @@ window.onload = function () { | ||
``` | ||
```text | ||
gifken | ||
@@ -128,6 +130,7 @@ ├── build build results | ||
To build gifken, following tools are required | ||
* Node.js >=8.0.0 | ||
* npm | ||
``` | ||
- Node.js >=8.0.0 | ||
- npm | ||
```bash | ||
git clone *thisrepo* | ||
@@ -134,0 +137,0 @@ cd gifken |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40139
936
143
0
15