msrd0 / rlottie-rs

Rust bindings to rlottie and file conversion library and tools
MIT License
17 stars 4 forks source link

Add `data_as_bytes` and `into_data` functions and `AsRef` impl for `Surface` #26

Closed msrd0 closed 1 year ago

msrd0 commented 1 year ago

CC @YuraIz - Does this help you reduce the unsafe code you have to write to use this library?

yuraiz commented 1 year ago

That's how I use Surface

image

Height and width can be changed between frames so I don't think that I can save surface between frames

Also I have wrapper for animation to be able to send it between threads

image

msrd0 commented 1 year ago

Ok you should now be able to call glib::Bytes::from_owned(surface) directly.