diff --git a/lib/image/png.js b/lib/image/png.js index 0e9acfb..0b60cfa 100644 --- a/lib/image/png.js +++ b/lib/image/png.js @@ -49,10 +49,10 @@ class PNGImage { // For PNG color types 0, 2 and 3, the transparency data is stored in // a dedicated PNG chunk. - if (this.image.transparency.grayscale) { + if (this.image.transparency.grayscale != null) { // Use Color Key Masking (spec section 4.8.5) // An array with N elements, where N is two times the number of color components. - const val = this.image.transparency.greyscale; + const val = this.image.transparency.grayscale; return this.obj.data['Mask'] = [val, val]; } else if (this.image.transparency.rgb) {