Skip to content

Commit

Permalink
v1.1.1 fixed parser miscalculates duration of ANMF chunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
mooyoul committed Jun 25, 2018
1 parent 9494d56 commit 198472f
Show file tree
Hide file tree
Showing 22 changed files with 4,319 additions and 4,309 deletions.
22 changes: 16 additions & 6 deletions README.md
Expand Up @@ -127,14 +127,19 @@ emitted after all WebP chunks have parsed

## Changelog

#### 1.1.1

- fixed parser miscalculates `duration` of `ANMF` chunk.
- If actual ANMF duration is 60(ms), parser reported duration as 61(ms), not 60.

#### 1.1.0

- Now `WebPInfo#parse`, `WebPInfo#isAnimated`, `WebPInfo#isLossless` methods can accept not only Buffer but also Local File Path, URL, and ReadableStream.


#### 1.0.4

Initial Release
- Initial Release


## Debugging
Expand All @@ -147,19 +152,24 @@ You will be able to see debug messages on your console.

## Testing

> $ npm run test
```bash
$ npm run test
```

... OR

> $ npm run lint
> $ npm run coverage
```bash
$ npm run lint # Check lint
$ npm run coverage # Run test & generate code coverage report
```



## Build

> $ npm run build
```bash
$ npm run build
```


## License
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "webpinfo",
"version": "1.1.0",
"version": "1.1.1",
"description": "Get information of WebP Image (Supports Animated WebP also!)",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -9,7 +9,7 @@
"build": "npm run clean && tsc",
"prepublishOnly": "npm run build",
"lint": "tslint -c tslint.json '{examples,src,test}/**/*.ts'",
"test": "TS_NODE_PROJECT=tsconfig.test.json nyc mocha -R spec test/**/*.ts"
"test": "TS_NODE_PROJECT=tsconfig.test.json nyc mocha -R spec test/**/*.{e2e,spec}.ts"
},
"nyc": {
"require": [
Expand Down
2 changes: 1 addition & 1 deletion src/webpinfo.ts
Expand Up @@ -927,7 +927,7 @@ export class WebPInfo extends StreamParserWritable {

const frameDuration = (buf.readUInt8(12) |
buf.readUInt8(13) |
buf.readUInt8(14)) + 1;
buf.readUInt8(14));

const tailBits = buf.readUInt8(15);

Expand Down

0 comments on commit 198472f

Please sign in to comment.