Giter VIP home page Giter VIP logo

imagesnap's Introduction

Image Snap

by: Robert Harder

[email protected]

Example

http://www.dayofthenewdan.com/projects/tlassemble

Capture Images from the Command Line

http://iharder.net/imagesnap

ImageSnap is a Public Domain command-line tool that lets you capture still images from an iSight or other video source.

Installation

Copy the imagesnap file to someplace on your path like /usr/local/bin, or leave it in a "current directory," and call it with ./imagesnap instead.

Enjoy!

Usage

To capture an image simply run the program from the command line.

$ imagesnap
Capturing image from device "iSight"..................snapshot.jpg

To specify a filename, make that your last argument:

$ imagesnap icu.jpg
Capturing image from device "iSight"..................icu.jpg

If you have multiple video devices attached to your computer, use the -l ("el") flag to list them:

$ imagesnap -l
Video Devices:
iSight
DV

To select a specific video device use the -d device flag:

$ imagesnap -d DV
Capturing image from device "DV"..................snapshot.jpg

To output a jpeg representation to standard out (stdout), use a dash for the filename:

$ ssh [email protected] /usr/local/bin/imagesnap - > snapshot.jpg
$ open snapshot.jpg

Git Hook Usage

Add this to your git hooks in .git/hooks/post-commit and you'll be all set.

#!/bin/bash
FILE="${HOME}/.gitshots/$(date +%s).jpg"
if [ ! -f "../../rebase-merge" ]; then
  echo "Taking capture into $FILE!"
  imagesnap -q -w 3 $FILE &
fi
exit 0

Image Formats

The following image formats are supported and are determined by the filename extension: JPEG, TIFF, PNG, GIF, BMP.

Changes

  • v0.2.5 - Added option to delay the first snapshot for some time. Added a time-lapse feature (thanks, Bas Zoetekouw).
  • v0.2.4 - Found bug that caused crash on Mac OS X 10.5 (but not 10.6).
  • v0.2.4beta - Tracking bug that causes crash on Mac OS X 10.5 (but not 10.6).
  • v0.2.3 - Fixed bug that caused all images to be saved as TIFF. Not sure when this bug was introduced.
  • v0.2.2 - Added ability to output jpeg to standard out. Made executable lowercase imagesnap.
  • v0.2.1 - Changed name from ImageCapture to ImageSnap to avoid confusion with Apple's Image Capture application.
  • v0.2 - Multiple file formats (not just TIFF). Faster response.
  • v0.1 - This is the initial release.

A Note About Public Domain

I have released this software into the Public Domain. That means you can do whatever you want with it. Really. You don't have to match it up with any other open source license โ€” just use it. You can rename the files, do whatever you want. If your lawyers say you have to have a license, contact me, and I'll make a special release to you under whatever reasonable license you desire: MIT, BSD, GPL, whatever.

imagesnap's People

Contributors

aw avatar jchampemont avatar nkirsch avatar noreaster76 avatar rharder avatar strml avatar warmwaffles avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.