problem with -resize, grey square appears on picture

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
heligert

problem with -resize, grey square appears on picture

Post by heligert »

Hi,

When resizing photoes using

Code: Select all

/usr/bin/convert 26623.jpg -quality 80 -resize 650x450 test.jpg
on the command line, sometimes (!), a strage grey square appears in the lower part of the image, as if the image wasn't fully created. In, I guess, 90% of all cases, the resizing works as expected.

Any idea what could be the problem?

Thanks in advance,

hg
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with -resize, grey square appears on picture

Post by fmw42 »

what version of IM are you using? if old, try upgrading.

post a link to one of your images and others can take a look
heligert

Re: problem with -resize, grey square appears on picture

Post by heligert »

Hi,

This is an example image: http://www.flickr.com/photos/86282986@N00/4166709805/,
imagemagick is running on a managed server, not sure about the version ...
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: problem with -resize, grey square appears on picture

Post by Bonzo »

We need your original image so it can be tested.

Upload and run this code to display your version:

Code: Select all

<?php
echo "<pre>";
system("convert -version");  
echo "</pre>";
?> 
heligert

Re: problem with -resize, grey square appears on picture

Post by heligert »

OK, thx... here the version info:

Version: ImageMagick 6.2.4 07/28/09 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC

the original image can be downloaded at: http://www.flickr.com/photos/86282986@N00/4167541144/

I'd like to repeat that the mentioned error doesn't appear always ... just sometimes
the resizing seems to stop before finishing off completely...

Thanks in advance for your help, guys!

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

Re: problem with -resize, grey square appears on picture

Post by Bonzo »

It converts OK for me but that does not tell us a lot; as you say it looks as though the process stops part way through.

Your version of IM is old - 2005 version.

Try adding modifying the command to:

Code: Select all

/usr/bin/convert -size 650x450 26623.jpg -quality 80 -resize 650x450 test.jpg
It should speed up the process.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with -resize, grey square appears on picture

Post by fmw42 »

I had no problem with this image using IM 6.5.8-4 Q16 Mac OSX Tiger.

convert testimage.jpg -resize 650x450 -quality 80 testimage2.jpg


If Bonzo's suggestion does not work, try putting -quality last as above. But I suspect your IM is old and buggy or you have some corrupt images. Version 6.2.4 is over 300 versions old. You really need to upgrade it.
Post Reply