Script shell ubuntu for muliptle actions
Posted: 2010-08-27T05:57:19-07:00
Hello guys !
First I have to thank you, imagemagick devs for your work !
I haven't already used imagemagick but it seems very powerful !
I am on ubuntu (a tech guy installed it for me because i'm not an expert at computers) and I have installed imagemagick from here (http://doc.ubuntu-fr.org/imagemagick)
My problem is every day, I have to add some photos to a website. But those photos have to be transformed to fit with the website in the database, otherwise, the website send an error.
I used to transform each photo with photoshop but it takes me huge time when I have 50 photos...
So can you help me create a shell script to do some transformations ? there are just few.
- all photos in jpg, 72ppp
- if the width is bigger than the length, resize to 480px of width with ratio kept
- if the length is bigger than the width, resize to 560px of length with ratio kept
- make a thumbnail with the prefix "tn_"
- for all thumbnails resize the bigger size to 120px with ratio kept.
and that' all !
For each photo it takes me two or three minutes ! And I have twenty or thirty photos each day to resize !
Can you help me ?
First I have to thank you, imagemagick devs for your work !
I haven't already used imagemagick but it seems very powerful !
I am on ubuntu (a tech guy installed it for me because i'm not an expert at computers) and I have installed imagemagick from here (http://doc.ubuntu-fr.org/imagemagick)
My problem is every day, I have to add some photos to a website. But those photos have to be transformed to fit with the website in the database, otherwise, the website send an error.
I used to transform each photo with photoshop but it takes me huge time when I have 50 photos...
So can you help me create a shell script to do some transformations ? there are just few.
- all photos in jpg, 72ppp
- if the width is bigger than the length, resize to 480px of width with ratio kept
- if the length is bigger than the width, resize to 560px of length with ratio kept
- make a thumbnail with the prefix "tn_"
- for all thumbnails resize the bigger size to 120px with ratio kept.
and that' all !
For each photo it takes me two or three minutes ! And I have twenty or thirty photos each day to resize !
Can you help me ?