diff options
| -rw-r--r-- | src/jpeg-utils.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/jpeg-utils.cpp b/src/jpeg-utils.cpp index d46e064..a63afdd 100644 --- a/src/jpeg-utils.cpp +++ b/src/jpeg-utils.cpp @@ -266,11 +266,7 @@ resize_image (const gchar *src, const gchar *dst, w = MagickGetImageWidth (magick_wand); h = MagickGetImageHeight (magick_wand); amount = MAX (w, h) * SQUARED_SIMPLE_SHAVE_AMOUNT / 100; - MagickShaveImage (magick_wand, amount, amount); - - w = MagickGetImageWidth (magick_wand); - h = MagickGetImageHeight (magick_wand); - amount = MIN (w, h); + amount = MIN (w - 2*amount, h - 2*amount); MagickCropImage (magick_wand, amount, amount, (w - amount) / 2, (h - amount) / 2); break; default: |
