1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

Merge pull request #440 from discomrade/patch-1

Fix custom thumb_ext when using ImageMagick convert
This commit is contained in:
27chan 2022-06-06 22:06:16 -03:00 committed by GitHub
commit 1d8a577029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,8 +311,8 @@ class ImageConvert extends ImageBase {
$this->destroy();
}
$this->temp = tempnam($config['tmp'], 'convert');
$this->temp = tempnam($config['tmp'], 'convert') . ($config['thumb_ext'] == '' ? '' : '.' . $config['thumb_ext']);
$config['thumb_keep_animation_frames'] = (int)$config['thumb_keep_animation_frames'];
if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '') && $config['thumb_keep_animation_frames'] > 1) {