diff --git a/doc/api.md b/doc/api.md index 1193f00d..d4fe9741 100644 --- a/doc/api.md +++ b/doc/api.md @@ -36,6 +36,12 @@ size_t WebPEncodeLosslessBGRA(const uint8_t* bgra, int width, int height, Of course in this case, no quality factor is needed since the compression occurs without loss of the input values, at the expense of larger output sizes. +Note these functions, like the lossy versions, use the library's default +settings. For lossless this means 'exact' is disabled. RGB values in fully +transparent areas (that is, areas with alpha values equal to `0`) will be +modified to improve compression. To avoid this, use `WebPEncode()` and set +`WebPConfig::exact` to `1`. + ### Advanced encoding API A more advanced API is based on the WebPConfig and WebPPicture structures. diff --git a/src/webp/encode.h b/src/webp/encode.h index fd9fc4f1..a619afc8 100644 --- a/src/webp/encode.h +++ b/src/webp/encode.h @@ -65,9 +65,10 @@ WEBP_EXTERN size_t WebPEncodeBGRA(const uint8_t* bgra, int width, int height, // lossless manner. Files are usually larger than lossy format, but will // not suffer any compression loss. // Note these functions, like the lossy versions, use the library's default -// settings. For lossless this means 'exact' is disabled. RGB values in -// transparent areas will be modified to improve compression. To avoid this, -// use WebPEncode() and set WebPConfig::exact to 1. +// settings. For lossless this means 'exact' is disabled. RGB values in fully +// transparent areas (that is, areas with alpha values equal to 0) will be +// modified to improve compression. To avoid this, use WebPEncode() and set +// WebPConfig::exact to 1. WEBP_EXTERN size_t WebPEncodeLosslessRGB(const uint8_t* rgb, int width, int height, int stride, uint8_t** output);