diff --git imageapi_imagemagick.module imageapi_imagemagick.module
index 4e6cf10..c0e5d0b 100644
--- imageapi_imagemagick.module
+++ imageapi_imagemagick.module
@@ -217,11 +217,11 @@ function _imageapi_imagemagick_convert_exec($command_args, &$output, &$errors) {
       drupal_set_message(t('ImageMagick output: @output', array('@output' => $output)));
     }
 
-    if (!$return_code) {
+    if ($return_code != 0 && !empty($errors)) {
       // If ImageMagick returned a non-zero code, trigger a PHP error that will
       // be caught by Drupal's error handler, logged to the watchdog and
       // eventually displayed to the user if configured to do so.
-      trigger_error(t('ImageMagick reported an error: %error', array('%error' => $errors)), E_USER_ERROR);
+      trigger_error(t('ImageMagick reported error code %code : %error', array('%code' => $return_code, '%error' => $errors)), E_USER_ERROR);
     }
 
     return $return_code;