1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-03-17 20:17:48 +02:00

Remove reundant colorspace conversion

This commit is contained in:
DarthSim 2017-09-28 13:59:59 +06:00
parent 17af9782f0
commit 8756b3895b

6
vips.h

@ -146,8 +146,10 @@ vips_process_image(VipsImage **img, int resize, double scale, int crop, int smar
}
}
err = vips_colourspace_go(*img, &tmp, VIPS_INTERPRETATION_sRGB);
swap_and_clear(img, tmp);
if (vips_image_guess_interpretation(*img) != VIPS_INTERPRETATION_sRGB) {
err = vips_colourspace_go(*img, &tmp, VIPS_INTERPRETATION_sRGB);
swap_and_clear(img, tmp);
}
return err;
}