Browse Source

Don't fail if ICC profile import failed

DarthSim 6 years ago
parent
commit
253eae70ab
1 changed files with 4 additions and 3 deletions
  1. 4 3
      process.go

+ 4 - 3
process.go

@@ -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