mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Use bt709 if not lossless so colour is correct
This commit is contained in:
@@ -58,6 +58,8 @@ val encode(std::string buffer, int width, int height, AvifOptions options) {
|
|||||||
format == AVIF_PIXEL_FORMAT_YUV444
|
format == AVIF_PIXEL_FORMAT_YUV444
|
||||||
) {
|
) {
|
||||||
image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_IDENTITY;
|
image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_IDENTITY;
|
||||||
|
} else {
|
||||||
|
image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_BT709;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t* rgba = (uint8_t*)buffer.c_str();
|
uint8_t* rgba = (uint8_t*)buffer.c_str();
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user