2

I have a folder full of name*.jpg files.

I found that Imagemagick convert is the right 'tool' to resize my images.

The command I'm using is

convert name*.jpg -resize 2000x1500 name*.jpg

Problem is, that it uses all my RAM (8 GB) so my PC hangs and after a while it starts doing something but the output files are not resized.

Does anyone know what the issue could be?
Size of all files is about 200 MB.

4
  • also tried other output names. Same result :/
    – OcK
    Commented May 21, 2017 at 10:52
  • so about the size problem if I use , with the exclamation mark after the size it works: convert name*.jpg -resize 2000x1500! name*.jpg
    – OcK
    Commented May 21, 2017 at 10:54
  • convert does not accept multiple files as input or output. Also, if you want to overwrite orginal files use mogrify instead of convert.
    – pLumo
    Commented Aug 20, 2019 at 13:37
  • 1
    @OcK More than one package can install a convert command in /usr/bin. You may be able to get more answers and/or an explanation of what happened if you edit this question to include the output of lsb_release -a, type -a convert, apt list --installed '*magick*', and namei /usr/bin/convert. Commented Aug 21, 2019 at 4:39

1 Answer 1

2

Instead of:

convert name*.jpg -resize 2000x1500 new_name*.jpg

The following worked for me: (loop on every jpg image in the given folder):

for file in *.jpg
do 
    convert "$file" -resize 2000x1500 "new-$file"
done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .