Do not use ffmpeg for jpeg files

Resolves #203.
This commit is contained in:
Trevor Slocum 2021-04-24 23:43:53 -07:00
parent 75af600f7f
commit b8da098a51
1 changed files with 3 additions and 3 deletions

View File

@ -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])) {