Dataloader bug fixes
This commit is contained in:
1 parent
9b164a8688
commit
cc49786ee9
1 file changed
+2
@@ -107,6 +107,7 @@ class BucketsMixin:
|
|||||||
# reduce it to the nearest divisible number
|
# reduce it to the nearest divisible number
|
||||||
reduction = new_width % bucket_tolerance
|
reduction = new_width % bucket_tolerance
|
||||||
file_item.crop_width = new_width - reduction
|
file_item.crop_width = new_width - reduction
|
||||||
|
new_width = file_item.crop_width
|
||||||
# adjust the new x position so we evenly crop
|
# adjust the new x position so we evenly crop
|
||||||
file_item.crop_x = int(file_item.crop_x + (reduction / 2))
|
file_item.crop_x = int(file_item.crop_x + (reduction / 2))
|
||||||
elif height > width:
|
elif height > width:
|
||||||
@@ -121,6 +122,7 @@ class BucketsMixin:
|
|||||||
# reduce it to the nearest divisible number
|
# reduce it to the nearest divisible number
|
||||||
reduction = new_height % bucket_tolerance
|
reduction = new_height % bucket_tolerance
|
||||||
file_item.crop_height = new_height - reduction
|
file_item.crop_height = new_height - reduction
|
||||||
|
new_height = file_item.crop_height
|
||||||
# adjust the new x position so we evenly crop
|
# adjust the new x position so we evenly crop
|
||||||
file_item.crop_y = int(file_item.crop_y + (reduction / 2))
|
file_item.crop_y = int(file_item.crop_y + (reduction / 2))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in new issue
Block a user