Hello,
i´ve found a way to get it work for me - but i think there must be another way to do the trick...
In functions.php there are one line which describes the analyse image path and filename - this works so far for normal images but the
$hasAnalImage fails while file_exists function...
in this case i´ve createa a second value especially for the $hasAnalImage line... and it works!
The are some issues with the paths and the file_xx functions from php (probably depends on version??) i think.
So far - here comes the code with some lines from me:
Code: Select all
function getImageSrc( $event, $frame, $scale=SCALE_BASE, $captureOnly=false, $overwrite=false )
{
$eventPath = getEventPath( $event );
if ( !is_array($frame) )
$frame = array( 'FrameId'=>$frame, 'Type'=>'' );
//echo "S:$scale, CO:$captureOnly<br>";
$captImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $frame['FrameId'] );
$captPath = $eventPath.'/'.$captImage;
$thumbCaptPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$captImage;
//echo "CI:$captImage, CP:$captPath, TCP:$thumbCaptPath<br>";
$analImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-analyse.jpg", $frame['FrameId'] );
$analPath = $eventPath.'/'.$analImage;
$analPath1 = ZM_DIR_EVENTS.'/'.$eventPath.'/'.$analImage; //workaround by nibelungen79
$thumbAnalPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$analImage;
//echo "AI:$analImage, AP:$analPath, TAP:$thumbAnalPath<br>";
$alarmFrame = $frame['Type']=='Alarm';
//$hasAnalImage = $alarmFrame && file_exists( $analPath ) && filesize( $analPath ); //original line
$hasAnalImage = $alarmFrame && file_exists( $analPath1 ) && filesize( $analPath1 ); // workaround by nibelungen79
.........