From 8e9a8b421fb096eb40d83e57588ba7da5bdac0d0 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 31 Oct 2002 22:17:23 +0000 Subject: [PATCH] Changed zmu -i option to write to monitor named image file. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@119 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm.cpp | 5 ++++- src/zmu.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/zm.cpp b/src/zm.cpp index 3a3b4ab5b..24337b215 100644 --- a/src/zm.cpp +++ b/src/zm.cpp @@ -1570,7 +1570,10 @@ int Monitor::GetImage( int index ) const } Snapshot *snap = &image_buffer[index]; Image *image = snap->image; - image->WriteJpeg( "zmu.jpg" ); + + char filename[64]; + sprintf( filename, "%s.jpg", name ); + image->WriteJpeg( filename ); return( 0 ); } diff --git a/src/zmu.cpp b/src/zmu.cpp index cd051e85a..3d00aec57 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -26,7 +26,7 @@ void Usage() fprintf( stderr, "Options:\n" ); fprintf( stderr, " -m, --monitor : Specify which monitor to address, default 0 if absent\n" ); fprintf( stderr, " -s, --state : Output the current monitor state, 0 = idle, 1 = alarm, 2 = alert\n" ); - fprintf( stderr, " -i, --image [image_index] : Write captured image to disk as zmu.jpg, last image captured or \n" ); + fprintf( stderr, " -i, --image [image_index] : Write captured image to disk as .jpg, last image captured\n" ); fprintf( stderr, " or specified ring buffer index if given.\n" ); fprintf( stderr, " -t, --timestamp [image_index] : Output captured image timestamp, last image captured or specified\n" ); fprintf( stderr, " ring buffer index if given\n" );