From 429c1862546a2cbda044f459865e6cee7d9aa314 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sun, 24 May 2020 18:57:49 +0530 Subject: Publish deploy 2020-05-24 18:57 --- posts/2020-01-14-Converting-between-PIL-NumPy/index.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'posts/2020-01-14-Converting-between-PIL-NumPy/index.html') diff --git a/posts/2020-01-14-Converting-between-PIL-NumPy/index.html b/posts/2020-01-14-Converting-between-PIL-NumPy/index.html index 13d0379..13cd71d 100644 --- a/posts/2020-01-14-Converting-between-PIL-NumPy/index.html +++ b/posts/2020-01-14-Converting-between-PIL-NumPy/index.html @@ -7,13 +7,9 @@ # Convert array to Image img = PIL.Image.fromarray(arr) - - -

Saving an Image

try: - img.save(destination, "JPEG", quality=80, optimize=True, progressive=True) +

Saving an Image

try: + img.save(destination, "JPEG", quality=80, optimize=True, progressive=True) except IOError: PIL.ImageFile.MAXBLOCK = img.size[0] * img.size[1] - img.save(destination, "JPEG", quality=80, optimize=True, progressive=True) -
- -
Tagged with:
\ No newline at end of file + img.save(destination, "JPEG", quality=80, optimize=True, progressive=True) +Tagged with:
\ No newline at end of file -- cgit v1.2.3