Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信小游戏 iOS 下渲染某些 图片出现花屏 #17005

Closed
finscn opened this issue May 17, 2024 · 2 comments
Closed

微信小游戏 iOS 下渲染某些 图片出现花屏 #17005

finscn opened this issue May 17, 2024 · 2 comments
Assignees
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@finscn
Copy link
Contributor

finscn commented May 17, 2024

Cocos Creator version

3.8.3

System information

iOS

Issue description

渲染所用图片, 就是一张半透明的黑色小图, 在项目中拉大, 作为半透明背景.
图片在下面的zip中:

with-bug.png.zip

在微信安卓小游戏, web 上的正确效果: 就是一张半通明的黑色图片. (不举例了 很好理解)

在 微信iOS 下 的错误效果:
image


项目里有很多图片有这个问题, 他们的共同特点:

  • 尺寸都比较小
  • 都使用 oxipng 压缩过 , 所用参数 -o 4 --strip safe --alpha

oxipng ( https://github.com/shssoichiro/oxipng ) 是知名的png无损压缩软件, 理论上它的算法应该没有问题. 否则早就很多人反馈了.
而且 安卓 web 都没问题, 只有 微信小游戏iOS 有问题.

( 这个bug也许是 微信小游戏的 )

Relevant error log output

No response

Steps to reproduce

如上所述

Minimal reproduction project

No response

@qiuguohua
Copy link
Contributor

微信那边已经定位到问题了,在后续的版本里面会进行修复,可以通过premultiplyAlpha = true 来暂时规避这个问题。

@finscn
Copy link
Contributor Author

finscn commented May 22, 2024

微信那边已经定位到问题了,在后续的版本里面会进行修复,可以通过premultiplyAlpha = true 来暂时规避这个问题。

在哪里设置这个属性? 图片上? 但是我的图片不是预乘的 , 会引起其他问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants