(png)
| 174 | this.outputPath = this.splitPath(this.inputPaths[0]).directory; |
| 175 | } |
| 176 | checkPNG(png) { |
| 177 | if (png.depth != 8) |
| 178 | return false; |
| 179 | if ((png.channels == 1) && (png.palette)) { |
| 180 | png.palette = new Uint8Array(png.palette); |
| 181 | return true; |
| 182 | } |
| 183 | return (png.channels == 2) || (png.channels == 3) || (png.channels == 4); |
| 184 | } |
| 185 | pad(width) { |
| 186 | const colorDepth = (this.color) ? Bitmap.depth(this.colorFormat) : 32; |
| 187 | const alphaDepth = (this.alpha) ? Bitmap.depth(this.alphaFormat) : 32; |