Skip to content

Commit

Permalink
smolscale: Fix alpha channel being left out on some paths
Browse files Browse the repository at this point in the history
  • Loading branch information
hpjansson committed Jan 4, 2024
1 parent e92c8cf commit 53157ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chafa/internal/smolscale/smolscale-generic.c
Expand Up @@ -661,7 +661,7 @@ unpack_pixel_a234_u_to_234a_pl_128bpp (uint32_t p,
uint8_t alpha = p >> 24;

out [0] = ((p64 & 0x00ff0000) << 16) | ((p64 & 0x0000ff00) >> 8);
out [1] = ((p64 & 0x000000ff) << 32);
out [1] = ((p64 & 0x000000ff) << 32) | alpha;

from_srgb_pixel_xxxa_128bpp (out);
premul_ul_to_p8l_128bpp (out, alpha);
Expand Down Expand Up @@ -754,7 +754,7 @@ unpack_pixel_123a_u_to_123a_pl_128bpp (uint32_t p,
uint8_t alpha = p;

out [0] = ((p64 & 0xff000000) << 8) | ((p64 & 0x00ff0000) >> 16);
out [1] = ((p64 & 0x0000ff00) << 24);
out [1] = ((p64 & 0x0000ff00) << 24) | alpha;

from_srgb_pixel_xxxa_128bpp (out);
premul_ul_to_p8l_128bpp (out, alpha);
Expand Down

0 comments on commit 53157ea

Please sign in to comment.