summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-01-09 19:53:40 +0100
committerJules Laplace <julescarbon@gmail.com>2019-01-09 19:53:40 +0100
commitfd022cafdc8a782e00bdb91fb2afb3f4d7893fec (patch)
tree2a767a902657758d687c0be042a6083425936c0f
parente30750705b959d2596bb5144d856cf6052b0598a (diff)
crop moving
-rw-r--r--crop-moving.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/crop-moving.py b/crop-moving.py
index 1f4e69a..653dc72 100644
--- a/crop-moving.py
+++ b/crop-moving.py
@@ -83,7 +83,8 @@ def build_thumbnail(i, fn):
ii = i % (crop_width + x_margin + x_margin)
crop = (ii, y0, ii + crop_width + x_margin + x_margin, y0 + crop_height + y_margin + y_margin)
- image.crop(crops[n]).resize(dst_size).save(os.path.join(path, out_fn))
+ path = paths[0]
+ image.crop(crop).resize(dst_size).save(os.path.join(path, out_fn))
chunksize = 3
with Pool(processes=cpu_count()) as pool: