src/Webcam.js
function( shot, callback ) {

        var scope = this;

        if( typeof( shot ) === "number" ) {

            shot = scope.getShot( shot );

        }

        if( shot.location ) {

            FS.readFile( shot.location, function( err, data ) {

                callback( err, data );

            });

        } else if( ! shot.data ) {

            callback(
                new Error( "Shot not valid" )
            );

        } else {

            callback( null, shot.data );

        }

    }
function( shot, callback ) {

        var scope = this;

        if( typeof( shot ) === "number" ) {

            shot = scope.getShot( shot );

        }

        if( shot.location ) {

            FS.readFile( shot.location, function( err, data ) {

                callback( err, data );

            });

        } else if( ! shot.data ) {

            callback(
                new Error( "Shot not valid" )
            );

        } else {

            callback( null, shot.data );

        }

    }
function ( shot , callback ) { var scope = this ; if ( typeof ( shot ) === "number" ) { shot = scope . getShot ( shot ) ; } if ( shot . location ) { FS . readFile ( shot . location , function ( err , data ) { callback ( err , data ) ; } ) ; } else if ( ! shot . data ) { callback ( new Error ( "Shot not valid" ) ) ; } else { callback ( null , shot . data ) ; } }
Get shot buffer from location
0 indexed

@method getShotBuffer

@param {Number} shot Index of shots called
@param {Function} callback Returns a call from FS.readFile data

@return {Boolean}
Get shot buffer from location 0 indexed