Re: [SLE] electronic document storage system
From: Tom Nielsen (tom_at_neuro-logic.com)
Date: 10/05/03
- Previous message: c dric: "[SLE] ATI Radeon & Direct Rendering"
- In reply to: Bruce Marshall: "Re: [SLE] electronic document storage system"
- Next in thread: Tom Nielsen: "[SLE] GUI needed for image re-sizing...unless already done."
- Reply: Tom Nielsen: "[SLE] GUI needed for image re-sizing...unless already done."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: SLE <suse-linux-e@suse.com> Date: Sat, 04 Oct 2003 19:42:04 -0700
It works!!! Soooo cooool.
Thanks a bunch to Bruce and Anders!!!!
Tom
On Sat, 2003-10-04 at 10:01, Bruce Marshall wrote:
> Here's a better version of the script I posted... with thanks to Anders
> for his changes. What I had worked for me but wasn't generic enough to
> be posted.
>
> I've tested the script below and it seems to work just fine. Make the
> appropriate changes to the directory paths and the JPG quality and
> geometry parameters.
>
> BTW, the convert command shown within is part of ImageMagick and nothing
> else needs to be done to run the script. I run it from an icon on the
> desktop.
>
> #!/bin/sh
>
> #########################################################################
> # A simple script to create smaller and lower quality images from
> # one directory to another
> #########################################################################
>
> # The file format you wish to change
> FROM=jpg
>
> # The end result file format
> TO=jpg
>
> # Options for "convert"
> CONVERT_OPTIONS='-quality 70 -geometry 640x480'
>
> # Pull the directory name for the title
> FROM_DIR=/path_to_from_directory
> TO_DIR=/path_to_TO_directory
>
> #########################################################################
> # The actual conversion stuff
> # You can edit stuff below here to change how this works, or just stick
> # with the variables above (which should be good for most people
> #########################################################################
>
> echo Running $0
> echo
>
> COUNT=0
>
> cd $FROM_DIR
> for i in *.$FROM; do
>
> echo $1
> if [ ! -e "$TO_DIR/$i" ] # Process only files not already done
> then
> echo Converting $i... with $CONVERT_OPTIONS
> convert $CONVERT_OPTIONS $FROM_DIR/$i $TO_DIR/${i%%$FROM}$TO
> echo
> fi
>
> done;
>
> exit;
- - - - - - - - - - - - - - - - - -
Tom Nielsen
Neuro Logic Systems, Inc.
805.389.5435 x18
www.neuro-logic.com
- Previous message: c dric: "[SLE] ATI Radeon & Direct Rendering"
- In reply to: Bruce Marshall: "Re: [SLE] electronic document storage system"
- Next in thread: Tom Nielsen: "[SLE] GUI needed for image re-sizing...unless already done."
- Reply: Tom Nielsen: "[SLE] GUI needed for image re-sizing...unless already done."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|