[magick-users] newbie needs help with convert script
Anthony Thyssen
A.Thyssen at griffith.edu.au
Fri May 1 22:29:09 PDT 2009
On Fri, 1 May 2009 19:31:42 -0400
Vaskark <vaskark at gmail.com> wrote:
| Hi. I made a test script to convert all jpeg's in a single folder to a
| quality of 85, keeping the same filenames. It worked fine. This is the
| script:
|
| #!/bin/sh
|
| for img in `ls *.jpg`
| do
| convert $img -quality 85 $img
| done
|
| Now, my music folder is organized by artist, then album, then track title
| (i.e. Pink Floyd/The Wall/Hey You.mp3). Each folder in this nested structure
| also contains album art, named folder.jpg. What I need to do is convert each
| 'folder.jpg' to a quality of 85. I'm thinking the 'ls' command can't help me
| here. Does anyone have any advice to help with my goal?
|
| Any help is appreciated.
| Thanks.
See IM Examples, Basics, Batch Processing Alternatives
http://www.imagemagick.org/Usage/basics/#mogrify_not
The 'find' program will list the filenames recursivally
'xargs' then can run a command on each file one at a time.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
A novice practices until he gets it right.
An expert practices until he doesn't get it wrong.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list