mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 21:39:57 +00:00
Add minor check (bg index != local mask) to avoid checking the whole image
This commit is contained in:
parent
43881af1f2
commit
dd87c2ef17
@ -474,7 +474,8 @@ private:
|
||||
// Check if we need an extra color equal to the bg color in a
|
||||
// transparent frameImage.
|
||||
bool needsExtraBgColor = false;
|
||||
if (!m_opaque && m_sprite->pixelFormat() == IMAGE_INDEXED) {
|
||||
if (m_sprite->pixelFormat() == IMAGE_INDEXED &&
|
||||
!m_opaque && m_bgIndex != m_localTransparentIndex) {
|
||||
for (const auto& i : LockImageBits<IndexedTraits>(frameImage)) {
|
||||
if (i == m_bgIndex &&
|
||||
i != m_localTransparentIndex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user