diff --git a/imagemagick.module b/imagemagick.module
index 9e99687..415761b 100644
--- a/imagemagick.module
+++ b/imagemagick.module
@@ -238,8 +238,8 @@ function image_imagemagick_rotate(stdClass $image, $degrees, $background = NULL)
 function image_imagemagick_crop(stdClass $image, $x, $y, $width, $height) {
   // Even though the crop effect in Drupal core does not allow for negative
   // offsets, ImageMagick supports them.
-  $x_signed = (((int) $x) >= 0 ? '+' : '-') . $x;
-  $y_signed = (((int) $y) >= 0 ? '+' : '-') . $y;
+  $x_signed = (((int) $x) >= 0 ? '+' : '-') . intval($x);
+  $y_signed = (((int) $y) >= 0 ? '+' : '-') . intval($y);
   $image->ops[] = '-crop ' . (int) $width . 'x' . (int) $height . $x_signed . $y_signed . '!';
   $image->info['width'] = $width;
   $image->info['height'] = $height;
