diff --git a/src/abeautifulsite/SimpleImage.php b/src/abeautifulsite/SimpleImage.php index 21d6257..10b97e6 100644 --- a/src/abeautifulsite/SimpleImage.php +++ b/src/abeautifulsite/SimpleImage.php @@ -1029,8 +1029,8 @@ function thumbnail($width, $height = null) { } else { $this->fit_to_width($width); } - $left = ($this->width / 2) - ($width / 2); - $top = ($this->height / 2) - ($height / 2); + $left = floor(($this->width / 2) - ($width / 2)); + $top = floor(($this->height / 2) - ($height / 2)); // Return trimmed image return $this->crop($left, $top, $width + $left, $height + $top);