shg / org-inline-anim.el

Inline playback of animated GIF/PNG for Org
GNU General Public License v3.0
24 stars 1 forks source link

animate all images in buffer? #1

Closed emacsomancer closed 1 year ago

emacsomancer commented 1 year ago

Is there an easy way of animating all animateable images in a buffer?

shg commented 1 year ago

Not possible with the current version of org-inline-anim.el but technically it's possible, by just calling image-animate on all the animatable images in the buffer at once.

I would like to implement it. But please be patient until I have some time for it. Thank you for your suggestion.

emacsomancer commented 1 year ago

Yes, of course, not a pressing issue, but would be nice to have eventually.

I note too that as-is this package already works also for WebP animated images, as supported by Emacs 29+ (cf. https://lars.ingebrigtsen.no/2022/04/13/15x10/ ), which is nice.

shg commented 1 year ago

as-is this package already works also for WebP animated images

That's great to know!

;; Well, actually, this package doesn't do anything file-format specific, so I can say it is to be expected, but it is great to have an extra selling point without having done anything. :)

shg commented 1 year ago

Implemented in 9316fe78319fa18c7282993bd547cd33fda1b8ee

emacsomancer commented 1 year ago

image-animate-loop doesn't seem to be respected (never animates in loop)?

shg commented 1 year ago

This package does not check the image-animate-loop variable. You need to use the prefix argument to control looping etc. Are there any situations you want to use image-animate-loop?

emacsomancer commented 1 year ago

I think generally when I have images that can be animated visible, I want them to loop. I don't know if it would make sense to have a variable (either internal to org-inline-anim or re-using image-animate-loop) to enable this (without using the prefix argument).

shg commented 1 year ago

I see. It may be useful to allow a user to choose the default behavior. I think it's better to have an variable in org-inline-anim instead of reusing image-animate-loop. Let me think about it.