convert/mogrify adding whitespace on some images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rossriley

convert/mogrify adding whitespace on some images

Post by rossriley »

I'm having a bit of a problem when resizing images down using either convert or mogrify.

The images resize to the correct width/height but it seems some of the bottom of the image is being cropped and replaced with white space. The effect seems to be exaggerated at very small sizes, where sometimes around 10% of the image goes missing.

Does anybody know why this is happening and if there are any workarounds?

Thanks for your help...

Ross
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert/mogrify adding whitespace on some images

Post by Bonzo »

How about posting your code ?
rossriley

Re: convert/mogrify adding whitespace on some images

Post by rossriley »

just simple:
convert $source -thumbnail 80x80 $destination
or
convert $source -resize 50x50 $destination
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert/mogrify adding whitespace on some images

Post by anthony »

Your code is incomplete. What are the formats of $source and $destination?
Also check if the original image that has this problem view ok using "display".
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply