Add interlaced to meta data

This commit is contained in:
Luke Page 2015-08-02 11:50:19 +01:00
parent d9452afc44
commit 86a114be2f
2 changed files with 4 additions and 1 deletions

View file

@ -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"

View file

@ -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)