From 1307719e4ea087b1941178b4a432f47e69d28d7d Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Mon, 17 Feb 2014 22:14:00 -0500 Subject: [PATCH] Fixes #35 --- src/abeautifulsite/SimpleImage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);