PNG上传后背景变黑

发布于 2024-12-01 01:15:01 字数 108 浏览 2 评论 0原文

当我尝试上传 png 图像时,上传图像后图像的透明部分变成黑色...

我想知道如何解决这个问题,任何帮助将不胜感激,并提前致谢。

问候

Shabir吉尔卡

When i am trying to upload a png image, after uploading the images the transparent part of the image turns into black...

I would like to know howto fix this problem, any help will be highly appreciated and thanks in advance..

Regards

Shabir Gilkar

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽你眉间 2024-12-08 01:15:01

有很多不一致之处可能会导致这种情况。查看 imagecolortransparentimagealphablending 函数。

您也可以在不使用过滤器的情况下上传原始数据,但可能会产生一些后果(例如,直接存储 $_FILE 而不进行 GD 处理)。如果这就是您正在做的事情,那么提供更多细节不会有什么坏处。

There's a lot of inconsistencies that can cause that. Check out imagecolortransparent and imagealphablending functions.

You can also do the upload raw without a filter, but there may be consequences of that (e.g. storing $_FILE directly without GD processing). If that is what you're doing, a bit more detail wouldn't hurt.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文