Merge pull request #2805 from ixio/fix-#2804

Fix #2804: sets encoderinfo for images when saving multi-page PDF
This commit is contained in:
wiredfool 2017-11-05 15:18:22 +00:00 committed by GitHub
commit 52079cb297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -90,6 +90,13 @@ class TestFilePdf(PillowTestCase):
self.assertTrue(os.path.isfile(outfile))
self.assertGreater(os.path.getsize(outfile), 0)
# Append JPEG images
jpeg = Image.open("Tests/images/flower.jpg")
jpeg.save(outfile, save_all=True, append_images=[jpeg.copy()])
self.assertTrue(os.path.isfile(outfile))
self.assertGreater(os.path.getsize(outfile), 0)
if __name__ == '__main__':
unittest.main()