From db33e31a4122c71b5648dbb73f4655c4a92ad77b Mon Sep 17 00:00:00 2001 From: Luke Page Date: Wed, 28 Oct 2015 19:48:26 +0000 Subject: [PATCH] clarify bgColor option --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 37617ce..d4daedc 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ As input any color type is accepted (grayscale, rgb, palette, grayscale with alp - `colorType` - the output colorType - see constants. 2 = color, no alpha, 6 = color & alpha. Default currently 6, but in the future may calculate best mode. - `inputHasAlpha` - whether the input bitmap has 4 bits per pixel (rgb and alpha) or 3 (rgb - no alpha). - `bgColor` - an object containing red, green, and blue values between 0 and 255 -that is used when an rgba image is converted to rgb (default: 255,255,255) +that is used when packing a PNG if alpha is not to be included (default: 255,255,255) ### Event "metadata" @@ -208,7 +208,7 @@ Buffer of image pixel data. Every pixel consists 4 bytes: R, G, B, A (opacity). ### Property: gamma Gamma of image (0 if not specified) -## Converting RGBA to RGB +## Packing a PNG and removing alpga (RGBA to RGB) When removing the alpha channel from an image, there needs to be a background color to correctly convert each pixel's transparency to the appropriate RGB value. By default, pngjs will flatten