Desktop: Fix bitmap file export not preserving alpha (#3673)

Fix Export not preserving alpha
This commit is contained in:
Timon
2026-01-26 14:51:48 +01:00
committed by GitHub
parent c07124332b
commit b4e9d7b9eb
4 changed files with 10 additions and 14 deletions

View File

@@ -189,10 +189,11 @@ async fn render<'a: 'n>(ctx: impl Ctx + ExtractFootprint + ExtractVarArgs, edito
}
}
let mut background = Color::from_rgb8_srgb(0x22, 0x22, 0x22);
if !contains_artboard && !render_params.hide_artboards {
background = Color::WHITE;
}
let background = if !render_params.for_export && !contains_artboard && !render_params.hide_artboards {
Some(Color::WHITE)
} else {
None
};
let texture = exec
.render_vello_scene_to_texture(&scene, physical_resolution, context, background)