Skip to content

Commit

Permalink
backports resampling when resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
jpstroop committed Oct 14, 2014
1 parent 18b7afb commit 73dc714
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions loris/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _derive_with_pil(im, target_fp, image_request, rotate=True, crop=True):
wh.reverse()

logger.debug(wh)
im = im.resize(wh)
im = im.resize(wh, resample=Image.ANTIALIAS)

if im.mode != "RGB":
im = im.convert("RGB")
Expand All @@ -118,7 +118,6 @@ def _derive_with_pil(im, target_fp, image_request, rotate=True, crop=True):
r = 0-int(image_request.rotation_param.uri_value)
im = im.rotate(r, expand=1)

# im = im.resize(wh)

# Here's a recipe for setting different background colors
# http://stackoverflow.com/a/5253554/714478
Expand Down

0 comments on commit 73dc714

Please sign in to comment.