From 2c2100d97835b4ba06d138c8d6a7d132eabda762 Mon Sep 17 00:00:00 2001 From: Sarah Mount Date: Mon, 5 Dec 2016 17:22:32 +0000 Subject: [PATCH] Fix PIL code. Image filters return a new image, which must be saved. --- 2015/2015-01-14-setting-up-a-simple-ocr-server.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2015/2015-01-14-setting-up-a-simple-ocr-server.markdown b/2015/2015-01-14-setting-up-a-simple-ocr-server.markdown index 405b9bb..1c0d776 100644 --- a/2015/2015-01-14-setting-up-a-simple-ocr-server.markdown +++ b/2015/2015-01-14-setting-up-a-simple-ocr-server.markdown @@ -163,7 +163,7 @@ from StringIO import StringIO def process_image(url): image = _get_image(url) - image.filter(ImageFilter.SHARPEN) + image = image.filter(ImageFilter.SHARPEN) return pytesseract.image_to_string(image) @@ -307,4 +307,4 @@ Hope you enjoyed this tutorial. Grab the final code [here](https://github.com/rh Happy hacking. -:) \ No newline at end of file +:)