From b8da098a5127b6f60689b9943976df8312ca1120 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Sat, 24 Apr 2021 23:43:53 -0700 Subject: [PATCH] Do not use ffmpeg for jpeg files Resolves #203. --- inc/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index beaf39a..b36df70 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -531,9 +531,9 @@ function ffmpegThumbnail($file_location, $thumb_location, $new_w, $new_h) { } function createThumbnail($file_location, $thumb_location, $new_w, $new_h) { - if (TINYIB_THUMBNAIL == 'gd') { - $system = explode(".", $thumb_location); - $system = array_reverse($system); + $system = explode(".", $thumb_location); + $system = array_reverse($system); + if (TINYIB_THUMBNAIL == 'gd' || (TINYIB_THUMBNAIL == 'ffmpeg' && preg_match("/jpg|jpeg/", $system[0]))) { if (preg_match("/jpg|jpeg/", $system[0])) { $src_img = imagecreatefromjpeg($file_location); } else if (preg_match("/png/", $system[0])) {