Fixed problem with thumbnails not being generated.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@36 e3e1d417-86f3-4887-817a-d78f3d33393fpull/27/merge
parent
f2366a4a96
commit
6011a7f0e0
|
@ -834,9 +834,9 @@ else
|
||||||
$frame_id = $row[FrameId];
|
$frame_id = $row[FrameId];
|
||||||
$image_path = $row[ImagePath];
|
$image_path = $row[ImagePath];
|
||||||
|
|
||||||
|
$capt_image = $image_path;
|
||||||
if ( $scale == 1 )
|
if ( $scale == 1 )
|
||||||
{
|
{
|
||||||
$capt_image = $image_path;
|
|
||||||
$anal_image = preg_replace( "/capture/", "analyse", $image_path );
|
$anal_image = preg_replace( "/capture/", "analyse", $image_path );
|
||||||
|
|
||||||
if ( file_exists($anal_image) && filesize( $anal_image ) )
|
if ( file_exists($anal_image) && filesize( $anal_image ) )
|
||||||
|
@ -850,15 +850,15 @@ else
|
||||||
}
|
}
|
||||||
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 ) )
|
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 ) )
|
if ( file_exists( $anal_image ) )
|
||||||
$command = "jpegtopnm -dct fast $anal_image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image";
|
$command = "jpegtopnm -dct fast $anal_image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image";
|
||||||
else
|
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( escapeshellcmd( $command ) );
|
||||||
exec( $command );
|
exec( $command );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue