Skip to content

Commit

Permalink
Always decode 3 or 4 channel PNG images.
Browse files Browse the repository at this point in the history
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
luigi-rosso committed Mar 9, 2024
1 parent 72a2169 commit 292edfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rive_head
@@ -1 +1 @@
7cb7eb8122d3625aad2c6032615006cc8f5383e8
09feaccb0c5bb3a2f88c23aca6c669d79eee4428
2 changes: 1 addition & 1 deletion .rive_renderer
@@ -1 +1 @@
835e7169f9a219b4d69e960f1b93fe2a4d8c3e84
114fbe972484aa69c1f8f2796fc3e811d3c9a2c8

0 comments on commit 292edfd

Please sign in to comment.