1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

Don't fail if ICC profile import failed

This commit is contained in:
DarthSim 2019-04-11 21:12:15 +06:00
parent f3c7f77b97
commit 253eae70ab

View File

@ -879,10 +879,11 @@ func vipsImportColourProfile(img **C.VipsImage) error {
return err
}
if C.vips_icc_import_go(*img, &tmp, cachedCString(profile)) != 0 {
return vipsError()
if C.vips_icc_import_go(*img, &tmp, cachedCString(profile)) == 0 {
C.swap_and_clear(img, tmp)
} else {
logWarning("Can't import ICC profile: %s", vipsError())
}
C.swap_and_clear(img, tmp)
}
return nil