mirror of
https://github.com/zyx0814/dzzoffice.git
synced 2025-01-07 03:16:58 +08:00
优化PNG格式的图像显示为黑色的问题 (#262)
This commit is contained in:
parent
949374c804
commit
3d2009dc4c
@ -309,7 +309,12 @@ class io_dzz extends io_api
|
||||
$quality = 80;
|
||||
$imgcachePath = 'imgcache/';
|
||||
$cachepath = str_replace('//', '/', str_replace(':', '/', $data['attachment'] ? $data['attachment'] : $data['path']));
|
||||
$target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_'.$thumbtype.'.jpeg';
|
||||
if ($data['ext'] == 'png' || $data['ext'] == 'PNG') {
|
||||
$targetext = '.png';
|
||||
} else {
|
||||
$targetext = '.jpeg';
|
||||
}
|
||||
$target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_'.$thumbtype.$targetext;
|
||||
if (!$original && $enable_cache && @getimagesize($_G['setting']['attachdir'] . './' . $target)) {
|
||||
if ($returnurl) return $_G['setting']['attachurl'] . '/' . $target;
|
||||
$file = $_G['setting']['attachdir'] . './' . $target;
|
||||
|
Loading…
Reference in New Issue
Block a user