mirror of
https://github.com/danbulant/pngjs
synced 2026-06-20 23:11:19 +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
|
||||
- `color` image is not grayscale
|
||||
- `alpha` image contains alpha channel
|
||||
- `interlace` image is interlaced
|
||||
|
||||
|
||||
### Event: "parsed"
|
||||
|
|
|
|||
|
|
@ -187,7 +187,8 @@ Parser.prototype._parseIHDR = function(data) {
|
|||
|
||||
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;
|
||||
|
||||
|
|
@ -195,6 +196,7 @@ Parser.prototype._parseIHDR = function(data) {
|
|||
width: width,
|
||||
height: height,
|
||||
depth: depth,
|
||||
interlace: interlace,
|
||||
palette: !!(colorType & constants.COLOR_PALETTE),
|
||||
color: !!(colorType & constants.COLOR_COLOR),
|
||||
alpha: !!(colorType & constants.COLOR_ALPHA)
|
||||
|
|
|
|||
Loading…
Reference in a new issue