Speculative fix for PNG alpha/gamma handling
The libpng documentation is hopelessly impenetrable and I have no idea what I'm doing, but this seems to fix the headless rendering failures.
This commit is contained in:
@@ -157,7 +157,7 @@ void PngReader<T>::read(unsigned x0, unsigned y0, unsigned w, unsigned h, char *
|
||||
double gamma;
|
||||
if (png_get_gAMA(png_ptr, info_ptr, &gamma))
|
||||
png_set_gamma(png_ptr, 2.2, gamma);
|
||||
png_set_alpha_mode(png_ptr, PNG_ALPHA_PREMULTIPLIED, 2.2);
|
||||
png_set_alpha_mode(png_ptr, PNG_ALPHA_PREMULTIPLIED, PNG_GAMMA_LINEAR);
|
||||
|
||||
if (x0 == 0 && y0 == 0 && w >= width_ && h >= height_)
|
||||
{
|
||||
|
||||
Submodule test/suite updated: 089df3baea...769c4c9c23
Reference in New Issue
Block a user