Skip to content

Commit

Permalink
Merge 146f407 into 23c4376
Browse files Browse the repository at this point in the history
  • Loading branch information
drazenzen committed Dec 21, 2019
2 parents 23c4376 + 146f407 commit be90286
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions photologue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,12 @@ def create_size(self, photosize):
im_filename = getattr(self, "get_%s_filename" % photosize.name)()
try:
buffer = BytesIO()
# Issue #182 - test fix from https://github.com/bashu/django-watermark/issues/31
if im.mode.endswith('A'):
im = im.convert(im.mode[:-1])
if im_format != 'JPEG':
im.save(buffer, im_format)
else:
# Issue #182 - test fix from https://github.com/bashu/django-watermark/issues/31
if im.mode.endswith('A'):
im = im.convert(im.mode[:-1])
im.save(buffer, 'JPEG', quality=int(photosize.quality),
optimize=True)
buffer_contents = ContentFile(buffer.getvalue())
Expand Down

0 comments on commit be90286

Please sign in to comment.