mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-04-02 04:50:23 +00:00
Rename Fit and Fill to ResizeToFit and ResizeToFill
This commit is contained in:
parent
5a8564d039
commit
3912003f02
2 changed files with 4 additions and 4 deletions
|
|
@ -175,7 +175,7 @@ class AddBorder(object):
|
|||
x=self.left, y=self.top).process(img)
|
||||
|
||||
|
||||
class Fit(object):
|
||||
class ResizeToFit(object):
|
||||
"""
|
||||
Resizes an image to fit within the specified dimensions.
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ from imagekit import utils
|
|||
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():
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue