Fix extra image copy; fix options unset of exif toggle
parent
99c8af4a17
commit
987db68452
|
@ -350,12 +350,13 @@ bool Event::SendFrameImage( const Image *image, bool alarm_frame )
|
|||
bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char *event_file, bool alarm_frame )
|
||||
{
|
||||
Image* ImgToWrite;
|
||||
Image ts_image( *image );
|
||||
Image* ts_image = NULL;
|
||||
|
||||
if ( config.timestamp_on_capture ) // stash the image we plan to use in another pointer regardless if timestamped.
|
||||
{
|
||||
monitor->TimestampImage( &ts_image, ×tamp );
|
||||
ImgToWrite=&ts_image;
|
||||
ts_image = new Image(*image);
|
||||
monitor->TimestampImage( ts_image, ×tamp );
|
||||
ImgToWrite=ts_image;
|
||||
}
|
||||
else
|
||||
ImgToWrite=image;
|
||||
|
@ -365,6 +366,7 @@ bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char
|
|||
int thisquality = ( alarm_frame && (config.jpeg_alarm_file_quality > config.jpeg_file_quality) ) ? config.jpeg_alarm_file_quality : 0 ; // quality to use, zero is default
|
||||
ImgToWrite->WriteJpeg( event_file, thisquality, (monitor->Exif() ? timestamp : (timeval){0,0}) ); // exif is only timestamp at present this switches on or off for write
|
||||
}
|
||||
if(ts_image) delete(ts_image); // clean up if used.
|
||||
return( true );
|
||||
}
|
||||
|
||||
|
|
|
@ -421,7 +421,8 @@ if ( !empty($action) )
|
|||
'Controllable' => 'toggle',
|
||||
'TrackMotion' => 'toggle',
|
||||
'Enabled' => 'toggle',
|
||||
'DoNativeMotDet' => 'toggle'
|
||||
'DoNativeMotDet' => 'toggle',
|
||||
'Exif' => 'toggle'
|
||||
);
|
||||
|
||||
$columns = getTableColumns( 'Monitors' );
|
||||
|
|
|
@ -111,7 +111,7 @@ if ( ! empty($_REQUEST['mid']) ) {
|
|||
'DefaultScale' => '100',
|
||||
'SignalCheckColour' => '#0000c0',
|
||||
'WebColour' => 'red',
|
||||
'Exif' => '',
|
||||
'Exif' => '0',
|
||||
'Triggers' => "",
|
||||
'V4LMultiBuffer' => '',
|
||||
'V4LCapturesPerFrame' => 1,
|
||||
|
|
Loading…
Reference in New Issue