mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 03:42:09 +00:00
Fix allowing alpha channel if layer is converted from indexed image (fix #3073)
This commit is contained in:
parent
e7575f2373
commit
f567805591
@ -276,8 +276,13 @@ Image* convert_pixel_format(
|
|||||||
|
|
||||||
if (!is_background && c == image->maskColor())
|
if (!is_background && c == image->maskColor())
|
||||||
*dst_it = rgba(0, 0, 0, 0);
|
*dst_it = rgba(0, 0, 0, 0);
|
||||||
else
|
else {
|
||||||
*dst_it = palette->getEntry(c);
|
const uint32_t p = palette->getEntry(c);
|
||||||
|
if (is_background)
|
||||||
|
*dst_it = rgba(rgba_getr(p), rgba_getg(p), rgba_getb(p), 255);
|
||||||
|
else
|
||||||
|
*dst_it = p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ASSERT(dst_it == dst_end);
|
ASSERT(dst_it == dst_end);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user