mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-20 15:08:00 +00:00
extended support for mp4 converted gifs so they can be used like normal mp4s
This commit is contained in:
16
inc/core.php
16
inc/core.php
@@ -152,7 +152,21 @@ function renderImage($data)
|
||||
case 'gif':
|
||||
if($data['mp4'])
|
||||
{
|
||||
renderMP4($pm->gifToMP4($path),$data);
|
||||
$mp4path = $path.'.mp4';
|
||||
if($data['raw'])
|
||||
{
|
||||
serveFile($mp4path, 'gif/raw/'.$hash,'video/mp4');
|
||||
}
|
||||
else if($data['preview'])
|
||||
{
|
||||
$file = $mp4path.'.jpg';
|
||||
if(!file_exists($file))
|
||||
$pm->saveFirstFrameOfMP4($mp4path);
|
||||
header ("Content-type: image/jpeg");
|
||||
readfile($file);
|
||||
}
|
||||
else
|
||||
renderMP4($pm->gifToMP4($path),$data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user