diff --git a/src/CanvasRenderingContext2d.cc b/src/CanvasRenderingContext2d.cc index bec341a..c3e0b12 100755 --- a/src/CanvasRenderingContext2d.cc +++ b/src/CanvasRenderingContext2d.cc @@ -645,7 +645,12 @@ NAN_METHOD(Context2d::PutImageData) { // argb // performance optimization: fully transparent/opaque pixels can be // processed more efficiently. - if (a == 0 || a == 255) { + if (a == 0) { + *dstRow++ = 0; + *dstRow++ = 0; + *dstRow++ = 0; + *dstRow++ = 0; + } else if (a == 255) { *dstRow++ = b; *dstRow++ = g; *dstRow++ = r;