diff -Nru pydenticon-0.3/debian/changelog pydenticon-0.3/debian/changelog --- pydenticon-0.3/debian/changelog 2017-02-12 09:58:22.000000000 +0000 +++ pydenticon-0.3/debian/changelog 2017-09-03 08:17:19.000000000 +0000 @@ -1,3 +1,10 @@ +pydenticon (0.3-2) unstable; urgency=medium + + * Add a patch to convert images to RGB explicitly before saving to JPEG + (Closes: #871079). + + -- Andrew Shadura Sun, 03 Sep 2017 10:16:48 +0200 + pydenticon (0.3-1) unstable; urgency=medium * Initial upload. diff -Nru pydenticon-0.3/debian/patches/0001-Convert-to-RGB-before-saving-as-JPEG.patch pydenticon-0.3/debian/patches/0001-Convert-to-RGB-before-saving-as-JPEG.patch --- pydenticon-0.3/debian/patches/0001-Convert-to-RGB-before-saving-as-JPEG.patch 1970-01-01 00:00:00.000000000 +0000 +++ pydenticon-0.3/debian/patches/0001-Convert-to-RGB-before-saving-as-JPEG.patch 2017-09-03 08:17:19.000000000 +0000 @@ -0,0 +1,27 @@ +From 4f66550c14238b18dc95f2c40e8e9f1b704de675 Mon Sep 17 00:00:00 2001 +From: Andrew Shadura +Date: Sun, 3 Sep 2017 10:04:49 +0200 +Subject: [PATCH] Convert to RGB before saving as JPEG. + +Pillow 3.7 removes support for saving RGBA images as JPEG. +--- + pydenticon/__init__.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pydenticon/__init__.py b/pydenticon/__init__.py +index 0edfdb0..f499988 100644 +--- a/pydenticon/__init__.py ++++ b/pydenticon/__init__.py +@@ -246,6 +246,9 @@ class Generator(object): + # Set-up a stream where image will be saved. + stream = BytesIO() + ++ if image_format.upper() == "JPEG": ++ image = image.convert(mode="RGB") ++ + # Save the image to stream. + try: + image.save(stream, format=image_format, optimize=True) +-- +2.11.0 + diff -Nru pydenticon-0.3/debian/patches/series pydenticon-0.3/debian/patches/series --- pydenticon-0.3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ pydenticon-0.3/debian/patches/series 2017-09-03 08:17:19.000000000 +0000 @@ -0,0 +1 @@ +0001-Convert-to-RGB-before-saving-as-JPEG.patch