QA Graphic

imageSnap

image Snap

ImageSnap is a Public Domain command-line tool that lets you capture still images from an iSight or other video source. You can use scripting tools to automate when to take pictures.

Someone wrote a BASH scripts to take a picture of someone that has stolen their laptop computer. Pretty cool way to use the tool.

Example Script

This is an example BASH script I wrote to send a picture of me when I log into the computer every morning:

#! /bin/bash
imagesnap -q -w 2 ~/Desktop/$(date +%y%m%d%H%M%S).png
PHP Example
#!/usr/bin/php
<?php
$files=shell_exec("imagesnap -q -w 2 ~/Desktop/$(date +%y%m%d%H%M%S).png");
?>

By default the picture will use the laptop camera, so if I hook up an external display with a camera it won't use that. I added the 2 seconds warm up because without the warm up the picture appears to be dark.

I have an action in Keyboard Maestro to enable the script to run within a minute after I log into the computer.

Cron Job

You can easily set up a file, using either of the above examples and run a cron job:

31 17 * * * user /path/to/file.sh

I can see if I am in the same mood in the morning as in the evening.

Here's a quick guide to what each item on cron line means:

Cron Sheet

 

Comments

Add Comments

Name:
Comment:

 

About

As someone who has worked on Macs since 1989, I will use my experience to share tips and tricks with you on Fridays. As a Mac user since 1989, I have seen the evolution of Mac software and hardware, and I know how Mac computers work. I also know how to troubleshoot and fix Mac problems that can arise.

Schedule

Monday Media Monday
TuesdayQA
WednesdaySnagIt for QA
ThursdayPython
FridayMacintosh
SaturdayInternet Tools
SundayOpen Topic