mirror of
https://github.com/danbulant/cushy
synced 2026-07-07 20:20:46 +00:00
Enabling animated transparent capture
This commit is contained in:
parent
6ff766846f
commit
5a78788396
1 changed files with 5 additions and 1 deletions
|
|
@ -3425,7 +3425,11 @@ where
|
||||||
self.recorder.window.size().width.get(),
|
self.recorder.window.size().width.get(),
|
||||||
self.recorder.window.size().height.get(),
|
self.recorder.window.size().height.get(),
|
||||||
);
|
);
|
||||||
encoder.set_color(png::ColorType::Rgb);
|
encoder.set_color(if Format::HAS_ALPHA {
|
||||||
|
png::ColorType::Rgba
|
||||||
|
} else {
|
||||||
|
png::ColorType::Rgb
|
||||||
|
});
|
||||||
encoder.set_adaptive_filter(png::AdaptiveFilterType::Adaptive);
|
encoder.set_adaptive_filter(png::AdaptiveFilterType::Adaptive);
|
||||||
encoder.set_animated(u32::try_from(frames.len()).assert("too many frames"), 0)?;
|
encoder.set_animated(u32::try_from(frames.len()).assert("too many frames"), 0)?;
|
||||||
encoder.set_compression(png::Compression::Best);
|
encoder.set_compression(png::Compression::Best);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue