Файл: video/inc/128/mp4.php
Строк: 12
<?
if (is_file(H."sys/video/screens/128/$v[id].gif"))
{
echo "<img src='/sys/video/screens/128/$v[id].gif' alt='scr...' />n";
}
elseif (class_exists('ffmpeg_movie')){
$media = new ffmpeg_movie($file);
$k_frame=intval($media->getFrameCount());
$w = $media->GetFrameWidth();
$h = $media->GetFrameHeight();
$ff_frame = $media->getFrame(intval($k_frame/2));
if ($ff_frame) {
$gd_image = $ff_frame->toGDImage();
if ($gd_image) {
$des_img = imagecreatetruecolor(128, 128);
$s_img = $gd_image;
imagecopyresampled($des_img, $s_img, 0, 0, 0, 0, 128, 128, $w, $h);
imagegif($des_img,H."sys/video/screens/128/$v[id].gif");
chmod(H."sys/video/screens/128/$v[id].gif", 0777);
imagedestroy($des_img);
imagedestroy($s_img);
echo "<img src='/sys/video/screens/128/$v[id].gif' alt='scr...' /><br />n";
}
}
}
?>