<?php

$file = $_GET['file'];

$frame = 26;

$mov = new ffmpeg_movie($file);

$w = $mov->GetFrameWidth();

$h = $mov->GetFrameHeight();

$ff_frame = $mov->getFrame($frame);

if ($ff_frame) {

$gd_image = $ff_frame->toGDImage();

if ($gd_image) {

$des_img = imagecreatetruecolor(24, 24);

$s_img = $gd_image;

imagecopyresampled($des_img, $s_img, 0, 0, 0, 0, 25, 25, $w, $h);

imagegif($des_img);

imagedestroy($des_img);

imagedestroy($s_img);

}

}

?>

