cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
6.82k stars 1.77k forks source link

Support Tinify API to compress images and Auto Atlas as well #16726

Open BenoitFreslon opened 6 months ago

BenoitFreslon commented 6 months ago

Use Case

Hello, We need to optimize all assets in our game so we usually use tiny.png to compress all PNGs.

Problem Description

However when we use the Auto Atlas feature, we can't compress manually the image generated from the Auto Atlas.

With CC compression: image With tiny.png compression: image

Proposed Solution

Propose an option that uses the Tinify API to compress images.

How it works

Sorry I don't know how to code this.

Alternatives Considered

The only solution we found is to use Free Texture Packer with the Tinify API image

Or go to the build folder and find the image to manyally compress the Atlas with Tiny.png.

Additional Information

No response

wuzhiming commented 3 months ago

you can go to cocos store and find the plugin, like this https://store.cocos.com/app/search?name=%E5%9B%BE%E7%89%87%E5%8E%8B%E7%BC%A9