mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix failure to convert palette-based PNG to WebP #2608
This commit is contained in:
parent
fd0e2a1cc3
commit
f3494e8a11
1 changed files with 4 additions and 0 deletions
|
|
@ -728,6 +728,10 @@ class FileHandler
|
||||||
}
|
}
|
||||||
elseif ($target_type === 'webp' && function_exists('imagewebp'))
|
elseif ($target_type === 'webp' && function_exists('imagewebp'))
|
||||||
{
|
{
|
||||||
|
if (!imageistruecolor($thumb))
|
||||||
|
{
|
||||||
|
imagepalettetotruecolor($thumb);
|
||||||
|
}
|
||||||
$output = imagewebp($thumb, $target_file);
|
$output = imagewebp($thumb, $target_file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue