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