Browse Source

Fix thumb_ext being ignored

When using ImageMagick's convert tool, the output defaults to the input format if no file extension or format is specified.
The temp file currently has no extension, so a $config['thumb_ext'] value has no effect on the image.
By appending the thumb_ext to the temp output file, it will convert the image to the intended format.
main
discomrade 3 years ago
parent
commit
b1629a33e9
  1. 2
      inc/image.php

2
inc/image.php

@ -311,7 +311,7 @@ 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'];

Loading…
Cancel
Save