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

Integrate APNG into show and save methods #16650

Open
gagern mannequin opened this issue Jul 12, 2014 · 18 comments
Open

Integrate APNG into show and save methods #16650

gagern mannequin opened this issue Jul 12, 2014 · 18 comments

Comments

@gagern
Copy link
Mannequin

gagern mannequin commented Jul 12, 2014

Once #16571 and #7298 get merged, it is time to add support for animapted PNGs (APNG) to the Animation.show() and Animation.save() methods, and also to update the doctests to use show(format="png") for these.

Depends on #7298
Depends on #16571

CC: @nilesjohnson

Component: graphics

Keywords: notebook, animate

Author: Martin von Gagern

Branch/Commit: u/gagern/ticket/16650 @ 6c6eee3

Issue created by migration from https://trac.sagemath.org/ticket/16650

@gagern gagern mannequin added this to the sage-6.3 milestone Jul 12, 2014
@gagern gagern mannequin added c: graphics labels Jul 12, 2014
@gagern
Copy link
Mannequin Author

gagern mannequin commented Jul 12, 2014

Branch: u/gagern/ticket/16650

@gagern
Copy link
Mannequin Author

gagern mannequin commented Jul 12, 2014

comment:3

Only the last commit is really new. The merge before that did resolve a conflict, but in a pretty obvious way. Everything else is from the named dependencies.


Last 10 new commits:

e2d3e11Proper hyperlink formatting in animate documentation.
bd17f04Add APNG support.
a60fe0bTurn generator into list when rendering frames.
04665b0Fix frame size for standard example animation.
f4a2427Merge fix of standard example animation into APNG branch.
8af6a08Base Animation.show on Animation.save, and pass more arguments.
3beb8b1Create HTML to embed generated GIF in notebook.
c16f275Support HTML5 video tag.
effa6cfMerge branch ticket/7298 into ticket/16571 to create ticket/16650.
83d734cAdd support for APNG to Animation.save().

@gagern
Copy link
Mannequin Author

gagern mannequin commented Jul 12, 2014

Commit: 83d734c

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 2, 2014

Changed commit from 83d734c to 1e4de99

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 2, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

bc9f681Merge fix of standard example animation into APNG branch.
780e614Proper hyperlink formatting in animate documentation.
10f8e52Make number of frames available after rendering using generator.
941170bAdd APNG support.
3a99225Merge ticket/16645 into ticket/16571 to deal with conflict.
f0bfc49Allow embedding animations into tables.
2fb3d6aMark test saving GIF as optional.
f61d9d1Merge branch ticket/7298 into ticket/16571 to create ticket/16650.
1e4de99Add support for APNG to Animation.save().

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 6, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e216b92Make number of frames available after rendering using generator.
b057e61Add APNG support.
f347d4cDoctests for each method of APngAssembler using tracing fixture.
7d2531dDetails on my APNG contribution in module documentation.
dc0067dBase Animation.show on Animation.save, and pass more arguments.
4e9101fCreate HTML to embed generated GIF in notebook.
e4807ccSupport HTML5 video tag.
2f6a670Allow embedding animations into tables.
d0e89d5Merge branch ticket/7298 into ticket/16571 to create ticket/16650.
f5fc857Add support for APNG to Animation.save().

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 6, 2015

Changed commit from 1e4de99 to f5fc857

@gagern
Copy link
Mannequin Author

gagern mannequin commented Mar 12, 2015

comment:8

The recent changes from #17234 prevent our dependency #7298 from being merged, and at the moment I'm far from sure how to rebase that code, see #7298 comment:48. Once I get that rebased, there is one question regarding this ticket here as well:

Should we reuse the PNG format description, or introduce a new one?

On the one hand, APNG (as opposed to MNG) is very much about graceful degradation, so it makes sense to treat it as PNG in most places. On the other hand, perhaps the display manager can decide whether a client is actually capable of displaying APNG or not. If so, we might prefer supported APNG over GIF, but GIF over unsupported APNG interpreted as still PNG. If the display manager does not know about APNG support, but does know that PNG is supported, then the user should at least be able to choose APNG format manually, even though it might not be the auto-selected default in that case.

@gagern gagern mannequin added s: needs work and removed s: needs review labels Mar 12, 2015
@vbraun
Copy link
Member

vbraun commented Mar 12, 2015

comment:9

Do not reuse OutputImagePng, that is for non-animated png.

Another basic output format should be a sequence of PNG, which can easily be displayed in a web browser with javascript (embed images as necessary). Perhaps the easiest animation format.

@gagern
Copy link
Mannequin Author

gagern mannequin commented Mar 12, 2015

comment:10

Replying to @vbraun:

Another basic output format should be a sequence of PNG, which can easily be displayed in a web browser with javascript (embed images as necessary). Perhaps the easiest animation format.

I'm not sure how much such a format would suffer from HTTP overhead, particularly for a large number of small frames. I guess it depends on the network connection (for the cloud in particular) whether that factor outweights the overhead of concatenating all PNGs to a single APNG file.

But if you are willing to use custom JavaScript code for animations, you could also use existing code which provides APNG support on browsers which don't support it natively.

@vbraun
Copy link
Member

vbraun commented Mar 12, 2015

comment:11

I'm thinking about base64-encoded inline images, especially since IPython doesn't allow you to return arbitrary collections of files. Though an apng polyfill would work, too.

@gagern
Copy link
Mannequin Author

gagern mannequin commented Aug 26, 2015

comment:12

I intend not to work on this until #7298 gets reviewed and ready for merge.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2015

Changed commit from f5fc857 to de1dcbb

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

a8d97b7Trac #7298: Enable HTML5 video in the Sage Notebook
f6e6412Trac #7298: Implement output types for various video container formats
ea5dfe2Trac #7298: Drop support for the autoplay and controls attributes for video
de1dcbbAdd support for APNG to Animation.save() and Animation.show(format="png").

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6c6eee3Trac #16650: Add support for APNG to Animation.save() and Animation.show().

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2015

Changed commit from de1dcbb to 6c6eee3

@gagern
Copy link
Mannequin Author

gagern mannequin commented Aug 26, 2015

comment:15

Since #7298 received a positive review just now, here is a rebased version of this modification here. With the new rich representations framework, there was a lot more to do than in the original commits. But it integrates APNG nicely with all the rest.

@gagern gagern mannequin added s: needs review and removed s: needs work labels Aug 26, 2015
@fchapoton
Copy link
Contributor

comment:16

does not apply

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
@mforets mforets mannequin mentioned this issue Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants