Problem using -resample and -resize

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
psafe
Posts: 5
Joined: 2011-11-08T01:05:47-07:00
Authentication code: 8675308

Problem using -resample and -resize

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem using -resample and -resize

Post 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.
psafe
Posts: 5
Joined: 2011-11-08T01:05:47-07:00
Authentication code: 8675308

Re: Problem using -resample and -resize

Post 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.
psafe
Posts: 5
Joined: 2011-11-08T01:05:47-07:00
Authentication code: 8675308

Re: Problem using -resample and -resize

Post by psafe »

http://img259.imageshack.us/img259/5774/drittes.jpg

this is one example of these not working images
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem using -resample and -resize

Post by magick »

Perhaps it has bogus metadata. The image reports a print size of 173600x127267 which generates huge numbers for the resample width / height.
psafe
Posts: 5
Joined: 2011-11-08T01:05:47-07:00
Authentication code: 8675308

Re: Problem using -resample and -resize

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem using -resample and -resize

Post by magick »

Don't use -resample. It resizes based on the image resolution. Use just -resize.
psafe
Posts: 5
Joined: 2011-11-08T01:05:47-07:00
Authentication code: 8675308

Re: Problem using -resample and -resize

Post 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 =)
Post Reply