diff --git a/odoo/tools/image.py b/odoo/tools/image.py index 5819b8c7b10..999b5c1e5e7 100644 --- a/odoo/tools/image.py +++ b/odoo/tools/image.py @@ -215,8 +215,8 @@ class ImageProcess(): new_w, new_h = (new_w * h) // new_h, h # Correctly place the center of the crop. - x_offset = (w - new_w) * center_x - h_offset = (h - new_h) * center_y + x_offset = int((w - new_w) * center_x) + h_offset = int((h - new_h) * center_y) if new_w != w or new_h != h: self.image = self.image.crop((x_offset, h_offset, x_offset + new_w, h_offset + new_h))