-
I was wondering if it's currently possible to edit gifs. import { ImageMagick, initializeImageMagick } from '@imagemagick/magick-wasm';
await initializeImageMagick();
const gif = '...'; // get gif from somewhere
ImageMagick.readCollection(gif, (frames) => {
// I can loop over each frame, but how do I save?
for (const frame of frames) {
frame.charcoal(); // for example
}
// ???
frames.dispose();
}); I can read a gif and get an array of frames, but I have no idea how to write/save the frame. I looked at tests and couldn't find much either. Thanks ❤️ |
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Mar 28, 2022
Replies: 1 comment 2 replies
-
If you want to save the individual frames you could call |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
KhafraDev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to save the individual frames you could call
frame.write
. And when you want to create a new gif you can callframes.write
.