mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Fix generating CompressedImage with mask
This commit is contained in:
parent
ceca640a98
commit
fac2dd046c
@ -42,20 +42,21 @@ CompressedImage::CompressedImage(const Image* image,
|
||||
scanline.x = x;
|
||||
|
||||
for (++x; x<image->width(); ++x) {
|
||||
if (maskBitmap && !get_pixel_fast<BitmapTraits>(maskBitmap, x, y))
|
||||
break;
|
||||
|
||||
c2 = get_pixel(image, x, y);
|
||||
|
||||
if (diffColors && c1 != c2)
|
||||
break;
|
||||
|
||||
if (maskBitmap && !get_pixel_fast<BitmapTraits>(maskBitmap, x, y))
|
||||
break;
|
||||
|
||||
if (!diffColors && !maskBitmap && c2 == mask)
|
||||
break;
|
||||
}
|
||||
|
||||
scanline.w = x - scanline.x;
|
||||
m_scanlines.push_back(scanline);
|
||||
if (scanline.w > 0)
|
||||
m_scanlines.push_back(scanline);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user