Commit 098d2fda authored by Aarni Koskela's avatar Aarni Koskela
Browse files

Reindent autocrop with 4 spaces

parent 48354525
Loading
Loading
Loading
Loading
+102 −100
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ def crop_image(im, settings):
        elif is_portrait(settings.crop_width, settings.crop_height):
        elif is_portrait(settings.crop_width, settings.crop_height):
            scale_by = settings.crop_height / im.height
            scale_by = settings.crop_height / im.height



    im = im.resize((int(im.width * scale_by), int(im.height * scale_by)))
    im = im.resize((int(im.width * scale_by), int(im.height * scale_by)))
    im_debug = im.copy()
    im_debug = im.copy()


@@ -260,6 +261,7 @@ def image_entropy(im):
    hist = hist[hist > 0]
    hist = hist[hist > 0]
    return -np.log2(hist / hist.sum()).sum()
    return -np.log2(hist / hist.sum()).sum()



def centroid(pois):
def centroid(pois):
    x = [poi.x for poi in pois]
    x = [poi.x for poi in pois]
    y = [poi.y for poi in pois]
    y = [poi.y for poi in pois]