13 October 2004

Script for Downloading Pictures From Digital Cameras

Posted under: at 02:11

Now that my digital camera is working, I just created a script to download pictures semi automatically from my digital camera. It currently does the following:

  • Camera device scanning, will refuse to run when camera is not plugged in.
  • No need to specify the ever changing device node, the script will attempt to obtain necessary information from /proc filesystem
  • Mounting and umounting
  • Moving pictures from camera to specified directory (big deal!)
  • Create two downsampled files from the pictures: a 200 pixel maximum side thumbnail and a 1000 pixel maximum side for online viewing, while still maintaining aspect ratio.
  • Pictures are moved into subdirectory named after the current date.
  • Open a Konqueror window on the final directory, if running under KDE.

Theory of operation: plug the camera, and run the script (keep in mind the ‘theory’ part :))

Requires:

  • sudo, configured to run mount, umount and mkdir as root (security hole I know, this is not designed to run under multiuser environment)
  • Kernel 2.6 with devfs
  • ImageMagick

To do:

  • Hotplug could be configured to run the script automatically whenever a camera is plugged in

Download it here.

2 Responses

Trackback: Use this URI to trackback this entry. Use your web browser's function to copy it to your blog posting.

Comment RSS: You can track conversation in this page by using this page's Comments RSS (XML)

Gravatar: You can have a picture next to each of your comments by getting a Gravatar.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Warning: Comments carrying links to questionable sites will be removed!