Could this be done?
/forum/topic/831327/0

end

andrew81
Registered: Jun 16, 2004
Total Posts: 2389
Country: Australia

Would it be possible to write a script (I understand this is possible with a mac) to take images from a card, resize for the web, and then transmit via either FTP or email (to certain email address) said resized photos.



luketrot
Registered: Mar 01, 2005
Total Posts: 898
Country: United States

Sure. Since Mac is really BSD/Unix you can create a simple Unix shell script.

When you create your script you will need to tell it to run in a shell

#!/bin/sh

I would use Imagemagick to resize your images:

ls \source\*.jpg| sed 's:\(.*\).jpg:/sw/bin/convert \1.jpg-resize 640x640 ../\1.jpg:' | bash

Then a simple FTP script to push images to your FTP server:

HOST='Your.FTP.Server'
USER='yourid'
PASSWD='yourpw'
FILE='*.jpg'

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $FILE
quit
END_SCRIPT
exit 0






pointedem
Registered: Jun 23, 2008
Total Posts: 175
Country: United States

lol gotta love that andrew81



end