[X-Unix] sips
Brian P. Minnebo
brian at minnebo.net
Thu Apr 8 07:26:56 PDT 2004
>
> Hello Folks,
>
> Has anyone begun using sips? ("Scriptable Image Processing System, a built in component of the OS X graphics subsystem")
>
> I have a friend who is a graphic artist and long time Mac user. He's moved to OS X from 9 and likes it although he's a card-carrying command line sceptic. He often asks "why all the hoopla about OS X internals? what can UNIX do for me?".
...
> My first attempt was the following test, I ran this on a set of around 50 images from a digital camera in separate sub directories :-
>
> find . -name '*.jpg' |xargs -j % sips -s format bmp %
>
> This works fine, the files are updated in place but the .jpg filename extension is not changed from jpg to bmp.
Try something like this:
# pipe list of jpg's to while loop
find . -name \*.jpg -print | while read i
do
# calculate filename w/out extension
dir=`dirname $i`
base=`basename $i .jpg`
file="$dir/$base"
# update and rename file
echo sips -s format bmp "$file.jpg"
echo mv "$file.jpg" "$file.bmp"
done
Remove the "echo " parts when you are satisfied the command will do what you expect.
>
> Has anyone done anything more useful with this utility?
Actuall, I've not used it. I rely on ImageMagick for such things.
Brian
--
More information about the X-Unix
mailing list