decoder: Update dimension with frame info

In theory the header information doesn't has to be correct. There are no
known formats where this is the case, but just to be safe.

Closes #305
This commit is contained in:
Sophie Herold 2024-01-21 14:19:33 +01:00
parent 2f0150ade1
commit c5685b5b5e

View file

@ -70,6 +70,10 @@ impl Glycin {
let mut metadata: Metadata = Metadata::default();
metadata.set_frame_info(frame.details);
updater.send(DecoderUpdate::Metadata(Box::new(metadata)));
tiles.set_original_dimensions((
frame.texture.width() as u32,
frame.texture.height() as u32,
));
if let Some(delay) = frame.delay {
updater.send(DecoderUpdate::Animated);