Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

Update documentation with help for JPEG image formats

Bradley Leonardcb698a7244f4
diff --git a/README.md b/README.md
index 1329aaa..f6111e3 100644
--- a/README.md
+++ b/README.md
@@ -142,6 +142,9 @@ from PIL import Image
input_path = 'input.png'
output_path = 'out.png'
+# Uncomment the following line if working with trucated image formats (ex. JPEG / JPG)
+# ImageFile.LOAD_TRUNCATED_IMAGES = True
+
f = np.fromfile(input_path)
result = remove(f)
img = Image.open(io.BytesIO(result)).convert("RGBA")