Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an APNG loader. Loaded APNGs are treated as opened projects right now, as importing them "as an image" doesn't really make sense.
Due to the "APNGs are subsets of PNGs" rule, an APNG will only be considered as such if it contains at least one APNG frame (which makes it distinct from a regular unanimated PNG).
On the previous PR regarding APNG, #772 @luiq54 mentioned as so:
With the addition of an APNG loader that shares quite a bit of common code with the saver (due to the nature of the technique used to load APNG efficiently with very little code), this has become rather important.
With the original APNG saver this was unnecessary as it was a single file in size, but that has now changed.
As such, I have refactored my APNG saver into an addon, and included an APNG loader.
The GIF exporter integration code still remains in Pixelorama (that part of the structure exists to keep the code clean more than anything else).
My addon is licensed under the Unlicense as it has been recommended to me as a better license for code than CC0 (due to Fedora policies and so forth).
I would recommend Pixelorama doesn't consider upstreaming to be much of a requirement for changes to the addon, my addon doesn't have much in the way of support guarantees, it only exists in this form because it's a good point that having it like this helps other Godot projects.
The following file loads in Pixelorama with this PR:
Notably, this doesn't include a GIF importer, but it does provide a useful path to import a GIF in that ffmpeg is capable of converting a GIF to an APNG (previously there was no way to import a GIF at all that I'm aware of without somehow getting it into a spritesheet).
Also notably, the addon may be of use for future animated splash screens, as it is capable of importing an APNG as an AnimatedTexture.