Skip to content

Commit

Permalink
Rename Fit and Fill to ResizeToFit and ResizeToFill
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwithanm committed Feb 18, 2012
1 parent 5a8564d commit 3912003
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion imagekit/processors/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def process(self, img):
x=self.left, y=self.top).process(img)


class Fit(object):
class ResizeToFit(object):
"""
Resizes an image to fit within the specified dimensions.
Expand Down
6 changes: 3 additions & 3 deletions tests/core/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from imagekit.lib import Image
from imagekit.models.fields import ImageSpecField
from imagekit.processors import Adjust
from imagekit.processors.resize import Fill
from imagekit.processors.crop import SmartCrop
from imagekit.processors import ResizeToFill
from imagekit.processors import SmartCrop


def generate_lenna():
Expand Down Expand Up @@ -52,7 +52,7 @@ class Photo(models.Model):
original_image = models.ImageField(upload_to='photos')

thumbnail = ImageSpecField([Adjust(contrast=1.2, sharpness=1.1),
Fill(50, 50)], image_field='original_image', format='JPEG',
ResizeToFill(50, 50)], image_field='original_image', format='JPEG',
options={'quality': 90})

smartcropped_thumbnail = ImageSpecField([Adjust(contrast=1.2,
Expand Down

0 comments on commit 3912003

Please sign in to comment.