FFmpeg php设置图像大小缩略图

时间:2014-02-03 19:36:06

标签: php ffmpeg

$movie=new ffmpeg_movie(''.$url.'');
$duration = $movie->getDuration();
$uzanti = substr($url , -3);
$duration = date('i:s',''.$duration.'');
$framesay = $movie->getFrameCount();
$framerate = $movie->getFrameRate();
$framehesap = $thumb * $framerate;
$md5 = md5($url);
$frame = $movie->getFrame($framehesap);
$gd = $frame->toGDImage();
imagepng($gd,'../thumb/'.$md5.'.png');

我想设置图片大小。我正如你所见,正在使用ffmpeg。如何设置缩略图大小? (我想要220x130)

1 个答案:

答案 0 :(得分:0)

使用imagescale

$gd = imagescale($gd, 220, 130);

请点击此处查看所有信息:http://nl3.php.net/manual/en/function.imagescale.php

修改:修复