mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 10:20:50 +00:00
DocumentExporter: Use transparent color to trim transparent layer (fix #622)
This commit is contained in:
parent
7c3547f147
commit
8cb1892601
@ -389,8 +389,12 @@ void DocumentExporter::captureSamples(Samples& samples)
|
||||
gfx::Rect frameBounds;
|
||||
doc::color_t refColor = 0;
|
||||
|
||||
if (m_trimCels)
|
||||
refColor = get_pixel(sampleRender, 0, 0);
|
||||
if (m_trimCels) {
|
||||
if (layer->isBackground())
|
||||
refColor = get_pixel(sampleRender, 0, 0);
|
||||
else
|
||||
refColor = sprite->transparentColor();
|
||||
}
|
||||
else if (m_ignoreEmptyCels)
|
||||
refColor = sprite->transparentColor();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user