nlfiedler / magick-rust

Rust bindings for ImageMagick
https://crates.io/crates/magick_rust
Apache License 2.0
259 stars 68 forks source link

Resize/stretch GIFs #106

Open Arthex1 opened 1 year ago

Arthex1 commented 1 year ago

Hello, i have recently started working on a wallpaper daemon and had to deal with resizing GIFs. Using the other crates resulted in a long, resource-consuming process, I didn't want to deal with. So I am trying to use magick-rust instead.

Now the normal read_image + resize + write doesn't seem to work, and results in a static image instead. If i even just read a image, and write it instantly, it still results in a static image. So i am curious on how i can resize a gif image?

Thats all, thanks.

nlfiedler commented 1 year ago

Are you referring to an animated gif? And by "static" you mean the result is not animated? In any case, I have no idea on the proper usage of MagickWand for this, but if you do know which functions and options should be used, we can make sure those are exposed via this crate.

vpzomtrrfrt commented 1 year ago

write_images_blob seems to give the right result

ohno104 commented 9 months ago

@Arthex1, try using coalesce() before write_images(), it works for me.