Find the answer to your Linux question:
Results 1 to 2 of 2
so far ive just created a script with that calls the convert command multiple times #! /bin/sh convert 'family 007.jpg' -thumbnail 100x100 './tmp/family 007.jpg' convert 'family 009.jpg' -thumbnail 100x100 './tmp/family ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    11

    how do i edit multiple files with imagemagick


    so far ive just created a script with that calls the convert command multiple times

    #! /bin/sh

    convert 'family 007.jpg' -thumbnail 100x100 './tmp/family 007.jpg'
    convert 'family 009.jpg' -thumbnail 100x100 './tmp/family 009.jpg'
    convert 'family 011.jpg' -thumbnail 100x100 './tmp/family 011.jpg'
    convert 'family 012.jpg' -thumbnail 100x100 './tmp/family 012.jpg'
    convert 'family 185.jpg' -thumbnail 100x100 './tmp/family 185.jpg'

    i remember they showed how to do that at linux.com but i cant find that article anymore

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by dexter855 View Post
    so far ive just created a script with that calls the convert command multiple times

    #! /bin/sh

    convert 'family 007.jpg' -thumbnail 100x100 './tmp/family 007.jpg'
    convert 'family 009.jpg' -thumbnail 100x100 './tmp/family 009.jpg'
    convert 'family 011.jpg' -thumbnail 100x100 './tmp/family 011.jpg'
    convert 'family 012.jpg' -thumbnail 100x100 './tmp/family 012.jpg'
    convert 'family 185.jpg' -thumbnail 100x100 './tmp/family 185.jpg'

    i remember they showed how to do that at linux.com but i cant find that article anymore
    A bit of shell scripting will suffice.

    Code:
    for file in *.jpg; do convert "$file" -thumbnail 100x100 "./tmp/$file"; done

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •