Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated GIFs #183

Open
skyjake opened this issue Feb 27, 2021 · 5 comments
Open

Animated GIFs #183

skyjake opened this issue Feb 27, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@skyjake
Copy link
Owner

skyjake commented Feb 27, 2021

The inline image viewer can load GIF images, but animated ones need additional work. Fortunately in v1.2, media handling was generalized a bit so a new type of media player could be added for animated images.

Here's a helpful reference: https://gist.github.com/urraka/685d9a6340b26b830d49

@skyjake skyjake added the enhancement New feature or request label Feb 27, 2021
@smaragdus
Copy link

@skyjake

You mean only animated GIFs and not animated PNGs (APNGs) like this one?

Lagrange 1 2 1 - 2021-02-27 - 009

For me PNG format is far superior to GIF format and support for animated PNGs would be great.

@skyjake
Copy link
Owner Author

skyjake commented Feb 27, 2021

Yeah for now only GIFs, since stb_image is doing the heavy lifting here.

APNG is interesting, but I expect it to require writing more code to extract the animation information and additional frames from the PNG chunks.

@niutech
Copy link

niutech commented Sep 20, 2021

@skyjake There is a patch for APNG support in stb_image.h, can't you use it?

@skyjake
Copy link
Owner Author

skyjake commented Sep 21, 2021

I likely could use that, but I'd rather stick to the unmodified stb_image.h from the main nothings repository, as there is no guarantee this patch will be updated whenever the main stb_image.h is updated.

I see this as quite a low priority feature. On the whole, I'd rather invest my time into better external viewer integration (#135).

@acidus99
Copy link

+1 for simple Animated GIF support, though I get not wanting to add more code in.

Perhaps a nice compromise would be to add text to the mime-type/sizing that says if the GIF is animated, so a reader knows to download it and view it with an external program? Looks like it would fit nicely here:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants