mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-15 20:48:00 +00:00
Fix PNG transparency in base64 backend upload
This commit is contained in:
@@ -748,6 +748,8 @@ class PictshareModel extends Model
|
||||
break;
|
||||
|
||||
case 'png':
|
||||
imagefill($source, 0, 0, IMG_COLOR_TRANSPARENT);
|
||||
imagesavealpha($source,true);
|
||||
imagepng($source,$output_file,(defined('PNG_COMPRESSION')?PNG_COMPRESSION:6));
|
||||
trigger_error("========= SAVING AS ".$type." TO ".$output_file);
|
||||
break;
|
||||
@@ -758,6 +760,8 @@ class PictshareModel extends Model
|
||||
break;
|
||||
|
||||
default:
|
||||
imagefill($source, 0, 0, IMG_COLOR_TRANSPARENT);
|
||||
imagesavealpha($source,true);
|
||||
imagepng($source,$output_file,(defined('PNG_COMPRESSION')?PNG_COMPRESSION:6));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user