Closed AlexNigl closed 11 years ago
The process function in ResizeToCover calculates wrong.
Example: original size: 95x95 target size: 28x28 result: 27x27
The Problem is the float 2 int cast in line 48 and 49 in pilkit/processors/resize.py.
new_width, new_height = (int(original_width * ratio), int(original_height * ratio))
I recommend a round() before the cast.
new_width, new_height = (int(round(original_width * ratio)), int(round(original_height * ratio)))
That bug might be in other processors too.
@AlexNigl FYI I have seen this, I'm just out of town, and I want to make sure that I find all occurrences and take some time to write a test for it. Thanks for reporting!
@AlexNigl Thanks!
The process function in ResizeToCover calculates wrong.
Example: original size: 95x95 target size: 28x28 result: 27x27
The Problem is the float 2 int cast in line 48 and 49 in pilkit/processors/resize.py.
I recommend a round() before the cast.
That bug might be in other processors too.