Page 1 of 1

Problem using -resample and -resize

Posted: 2011-11-08T01:42:37-07:00
by psafe
Hi,

we are currently experiencing problems while resizing some jpg images using resample and resize at the same time.
the full cmd is "convert -limit memory 0 -strip -resample 300 -colorspace RGB -resize 3507x3507 convert_fehlerbild.jpg convert_fehlerbild_neu.jpg"
Problem here is, that the /tmp dir is filled up until it is completely full and the command is still running but not responding anymore.
/tmp has about 4 Gb space. Identify for the file shows:
convert_fehlerbild.jpg JPEG 5208x3818 5208x3818+0+0 8-bit PseudoClass 256c 9.554MB 0.000u 0:00.000
Using SLES11 x64 - IM 6.7.3 from source (tried other versions, but no luck there either...)

Hope you can help.
Thanks so far

Re: Problem using -resample and -resize

Posted: 2011-11-08T05:08:33-07:00
by magick
See http://www.imagemagick.org/script/archi ... tera-pixel. Add -define registry:temporary-path=/data/tmp to your command line where /data/tmp is a path that has more than 4GB of temporary free space.

Re: Problem using -resample and -resize

Posted: 2011-11-08T06:44:46-07:00
by psafe
thx for the reply -

Do you think it is normal, that IM uses so much temp space on this image?
It is about 9,5mb. Other images don't use as much temp space as this, even if they are 17mb or bigger.

Re: Problem using -resample and -resize

Posted: 2011-11-08T07:21:29-07:00
by psafe
http://img259.imageshack.us/img259/5774/drittes.jpg

this is one example of these not working images

Re: Problem using -resample and -resize

Posted: 2011-11-08T08:44:25-07:00
by magick
Perhaps it has bogus metadata. The image reports a print size of 173600x127267 which generates huge numbers for the resample width / height.

Re: Problem using -resample and -resize

Posted: 2011-11-08T09:10:09-07:00
by psafe
Right! I didn' t notice this in the identify output.
Is there any commandline switch for convert that it ignores this print-size parameter?

Re: Problem using -resample and -resize

Posted: 2011-11-08T10:03:20-07:00
by magick
Don't use -resample. It resizes based on the image resolution. Use just -resize.

Re: Problem using -resample and -resize

Posted: 2011-11-09T00:43:59-07:00
by psafe
Thanks a lot.

I will try to patch the header, so that the print-resolution will be corrected.
You can close the topic =)