diff --git a/ImageSnap.m b/ImageSnap.m index c6f2202..e382a83 100644 --- a/ImageSnap.m +++ b/ImageSnap.m @@ -7,7 +7,7 @@ #import "ImageSnap.h" -NSString *const VERSION = @"0.2.15"; +NSString *const VERSION = @"0.2.16"; @interface ImageSnap() @@ -149,6 +149,13 @@ - (void)saveSingleSnapshotFrom:(AVCaptureDevice *)device if(path == nil){ path = @"./"; } + path = [path stringByStandardizingPath]; + [fileManager createDirectoryAtPath:path + withIntermediateDirectories:true + attributes:nil + error:nil]; + console("Saving images to %s\n", [path UTF8String]); + for (unsigned long long seq = 1; seq < ULLONG_MAX ; seq++) { // 64 bit counter - a lot of pictures if (seq > timelapseCount) { diff --git a/README.md b/README.md index b55cc4f..0cce403 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ Only JPEG output is supported. ## Changes +* v0.2.16 - Added ability to specify directory where timelapse images will be saved. * v0.2.15 - Added `-n` flag to limit the number of timelapse pictures. Also changed first timelapse image numbering to start at one instead of zero. * v0.2.14 - Bump to fix distribution problems only * v0.2.13 - Default warmup period is now three seconds. Set ```-w 0``` if you want no delay.