4e23254e73d2d921116f6b7ad399a2c905a0f0cf,imagekit/processors.py,Crop,process,#Crop#,99

Before Change



    def process(self, img, fmt, obj, spec):
        cur_width, cur_height = img.size
        crop_horz = getattr(obj, obj._ik.crop_horz_field, 1)
        crop_vert = getattr(obj, obj._ik.crop_vert_field, 1)
        ratio = max(float(self.width)/cur_width, float(self.height)/cur_height)
        resize_x, resize_y = ((cur_width * ratio), (cur_height * ratio))
        crop_x, crop_y = (abs(self.width - resize_x), abs(self.height - resize_y))

After Change



    def process(self, img, fmt, obj, spec):
        cur_width, cur_height = img.size
        horizontal_anchor, vertical_anchor = Crop._ANCHOR_PTS[self.anchor or \
                Crop.CENTER]
        ratio = max(float(self.width)/cur_width, float(self.height)/cur_height)
        resize_x, resize_y = ((cur_width * ratio), (cur_height * ratio))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: matthewwithanm/django-imagekit
Commit Name: 4e23254e73d2d921116f6b7ad399a2c905a0f0cf
Time: 2011-09-21
Author: matthew@exanimo.com
File Name: imagekit/processors.py
Class Name: Crop
Method Name: process


Project Name: has2k1/plotnine
Commit Name: f2435e3ac209629cfd89ddbd94826f8cf0db9aa5
Time: 2020-06-01
Author: has2k1@gmail.com
File Name: plotnine/geoms/annotation_stripes.py
Class Name: _geom_stripes
Method Name: draw_group


Project Name: mozilla/mozregression
Commit Name: ab788f802f8d23d6c07bccfee329ad1b3def7247
Time: 2015-06-11
Author: jonathan.pigree@gmail.com
File Name: gui/mozregui/report.py
Class Name: ReportModel
Method Name: attach_bisector