Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always decode 3 or 4 channel PNG images.
The bug @HayesGordon ran into with Unity was because we were trying to decode grayscale images to a single-channel image and then expanding those to 4 channels as the Rive Renderer expects RGBA. That was padding missing channel data with 255, which is why we were getting Cyan (R would be read, GBA were filled with 255). Instead, we make the Bitmap library only work with RGB and RGBA and we let libpng do the expansion for us. Glorious: <img width="417" alt="CleanShot 2024-03-08 at 21 28 21@2x" src="https://github.com/rive-app/rive/assets/454182/326e537b-15ad-4914-acb7-a85ddc42c88c"> Diffs= 09feaccb0 Always decode 3 or 4 channel PNG images. (#6818)
- Loading branch information