Rename BasicResize to Resize

This commit is contained in:
Matthew Tretter 2012-02-17 23:55:59 -05:00
parent 3fad906305
commit 5a8564d039

View file

@ -4,7 +4,7 @@ import warnings
from . import Anchor from . import Anchor
class BasicResize(object): class Resize(object):
""" """
Resizes an image to the specified width and height. Resizes an image to the specified width and height.
@ -43,7 +43,7 @@ class Cover(object):
float(self.height) / original_height) float(self.height) / original_height)
new_width, new_height = (int(original_width * ratio), new_width, new_height = (int(original_width * ratio),
int(original_height * ratio)) int(original_height * ratio))
return BasicResize(new_width, new_height).process(img) return Resize(new_width, new_height).process(img)
class Fill(object): class Fill(object):
@ -212,7 +212,7 @@ class Fit(object):
int(round(cur_height * ratio))) int(round(cur_height * ratio)))
if (cur_width > new_dimensions[0] or cur_height > new_dimensions[1]) or \ if (cur_width > new_dimensions[0] or cur_height > new_dimensions[1]) or \
self.upscale: self.upscale:
img = BasicResize(new_dimensions[0], img = Resize(new_dimensions[0],
new_dimensions[1]).process(img) new_dimensions[1]).process(img)
if self.mat_color: if self.mat_color:
img = ResizeCanvas(self.width, self.height, self.mat_color, anchor=self.anchor).process(img) img = ResizeCanvas(self.width, self.height, self.mat_color, anchor=self.anchor).process(img)