From 6011a7f0e02ecc22ab9632194544b95bda22e9cf Mon Sep 17 00:00:00 2001 From: stan Date: Mon, 23 Sep 2002 12:47:04 +0000 Subject: [PATCH] Fixed problem with thumbnails not being generated. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@36 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/zm.php b/web/zm.php index 96d78417e..8f93c45f1 100644 --- a/web/zm.php +++ b/web/zm.php @@ -834,9 +834,9 @@ else $frame_id = $row[FrameId]; $image_path = $row[ImagePath]; + $capt_image = $image_path; if ( $scale == 1 ) { - $capt_image = $image_path; $anal_image = preg_replace( "/capture/", "analyse", $image_path ); if ( file_exists($anal_image) && filesize( $anal_image ) ) @@ -850,15 +850,15 @@ else } else { - $thumb_image = preg_replace( "/capture/", "thumb", $image_path ); + $thumb_image = preg_replace( "/capture/", "thumb", $capt_image ); if ( !file_exists($thumb_image) || !filesize( $thumb_image ) ) { - $anal_image = preg_replace( "/capture/", "analyse", $image ); + $anal_image = preg_replace( "/capture/", "analyse", $capt_image ); if ( file_exists( $anal_image ) ) $command = "jpegtopnm -dct fast $anal_image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image"; else - $command = "jpegtopnm -dct fast $image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image"; + $command = "jpegtopnm -dct fast $capt_image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image"; #exec( escapeshellcmd( $command ) ); exec( $command ); }