mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Support more options for image autoconv
This commit is contained in:
parent
7f8f303787
commit
9f75788491
5 changed files with 46 additions and 48 deletions
|
|
@ -1176,23 +1176,11 @@ class FileController extends File
|
|||
{
|
||||
$adjusted['type'] = 'mp4';
|
||||
}
|
||||
elseif ($config->image_autoconv['png2jpg'] && $image_info['type'] === 'png' && function_exists('imagepng'))
|
||||
elseif (!empty($config->image_autoconv[$image_info['type']]))
|
||||
{
|
||||
$adjusted['type'] = 'jpg';
|
||||
$adjusted['type'] = $config->image_autoconv[$image_info['type']];
|
||||
}
|
||||
elseif ($config->image_autoconv['webp2jpg'] && $image_info['type'] === 'webp' && function_exists('imagewebp'))
|
||||
{
|
||||
$adjusted['type'] = 'jpg';
|
||||
}
|
||||
elseif ($config->image_autoconv['bmp2jpg'] && $image_info['type'] === 'bmp' && function_exists('imagebmp'))
|
||||
{
|
||||
$adjusted['type'] = 'jpg';
|
||||
}
|
||||
elseif ($config->image_autoconv['avif2jpg'] && $image_info['type'] === 'avif')
|
||||
{
|
||||
$adjusted['type'] = 'jpg';
|
||||
}
|
||||
elseif ($config->image_autoconv['heic2jpg'] && $image_info['type'] === 'heic')
|
||||
elseif (!empty($config->image_autoconv[$image_info['type'] . '2jpg']))
|
||||
{
|
||||
$adjusted['type'] = 'jpg';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue