Просмотр файла obmen/inc/icon48/wmv.php

Размер файла: 1.07Kb
  1. <?
  2. if (is_file(H."sys/obmen/screens/48/$post[id].gif"))
  3. {
  4.  
  5. echo "<img src='/sys/obmen/screens/48/$post[id].gif' alt='scr...' />\n";
  6. }
  7. elseif (class_exists('ffmpeg_movie')){
  8. $media = new ffmpeg_movie($file);
  9. $k_frame=intval($media->getFrameCount());
  10.  
  11. $w = $media->GetFrameWidth();
  12. $h = $media->GetFrameHeight();
  13. $ff_frame = $media->getFrame(intval($k_frame/2));
  14. if ($ff_frame) {
  15. $gd_image = $ff_frame->toGDImage();
  16. if ($gd_image) {
  17. $des_img = imagecreatetruecolor(48, 48);
  18. $s_img = $gd_image;
  19. imagecopyresampled($des_img, $s_img, 0, 0, 0, 0, 48, 48, $w, $h);
  20. imagegif($des_img,H."sys/obmen/screens/48/$post[id].gif");
  21. chmod(H."sys/obmen/screens/48/$post[id].gif", 0777);
  22. imagedestroy($des_img);
  23. imagedestroy($s_img);
  24.  
  25.  
  26.  
  27.  
  28.  
  29. echo "<img src='/sys/obmen/screens/48/$post[id].gif' alt='scr...' /><br />\n";
  30.  
  31. }
  32. }
  33. }
  34. elseif (is_file(H.'style/themes/'.$set['set_them'].'/loads/48/'.$ras.'.png'))
  35. echo "<img src='/style/themes/$set[set_them]/loads/48/$ras.png' alt='$ras' />\n";
  36. else echo "<img src='/style/themes/$set[set_them]/loads/48/file.png' alt='file' />\n";
  37.  
  38.  
  39. ?>