mirror of
https://github.com/danbulant/pngjs
synced 2026-07-08 04:30:33 +00:00
Add interlaced to meta data
This commit is contained in:
parent
d9452afc44
commit
86a114be2f
2 changed files with 4 additions and 1 deletions
|
|
@ -83,6 +83,7 @@ Image's header has been parsed, metadata contains this information:
|
||||||
- `palette` image is paletted
|
- `palette` image is paletted
|
||||||
- `color` image is not grayscale
|
- `color` image is not grayscale
|
||||||
- `alpha` image contains alpha channel
|
- `alpha` image contains alpha channel
|
||||||
|
- `interlace` image is interlaced
|
||||||
|
|
||||||
|
|
||||||
### Event: "parsed"
|
### Event: "parsed"
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,8 @@ Parser.prototype._parseIHDR = function(data) {
|
||||||
|
|
||||||
this._colorType = colorType;
|
this._colorType = colorType;
|
||||||
|
|
||||||
this.createData(width, height, colorTypeToBppMap[this._colorType], depth, interlace);
|
var bpp = colorTypeToBppMap[this._colorType];
|
||||||
|
this.createData(width, height, bpp, depth, interlace);
|
||||||
|
|
||||||
this._hasIHDR = true;
|
this._hasIHDR = true;
|
||||||
|
|
||||||
|
|
@ -195,6 +196,7 @@ Parser.prototype._parseIHDR = function(data) {
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
depth: depth,
|
depth: depth,
|
||||||
|
interlace: interlace,
|
||||||
palette: !!(colorType & constants.COLOR_PALETTE),
|
palette: !!(colorType & constants.COLOR_PALETTE),
|
||||||
color: !!(colorType & constants.COLOR_COLOR),
|
color: !!(colorType & constants.COLOR_COLOR),
|
||||||
alpha: !!(colorType & constants.COLOR_ALPHA)
|
alpha: !!(colorType & constants.COLOR_ALPHA)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue