eight04 / pyapng Goto Github PK
View Code? Open in Web Editor NEWA Python module to deal with APNG files.
License: MIT License
A Python module to deal with APNG files.
License: MIT License
Whenever I try to use this I get the error code integer out of range for 'I' format code
e.g.
APNG.from_files(images, delay=100).save('test.png')
Where images is a list of filepaths returns this error.
Python 2.7
Is it possible to pass a repeat count to the apng file? At the moment the repeat count stands at "-1" for repeat forever? Does the specification for apng even support repeat count?
How to do it?
I read in an image, and print out it's frames (as in your example). All output files have that error.
There is a rather serious issue when handling large PNG files at the moment. The following code:
from apng import APNG
im = APNG.open("test_large.apng")
im.frames[0][0].save("frame0.png")
generates broken png files for individual frames, if a frame contain more that one data chunk.
cf. #12 for a fix.
I got an APNG from here.
I tried extracting the frames using this, but found that there is a frame being extracted in only 1x1. Here's the extraction result
Then I used APNG Disassembler to extract the frames, I got that "missing frame".
It appears that frame 6 and 8 are the same, but frame 8 cannot be extracted using this. Here's the chunk structure acquired by pngcheck v2.3.0
:
That fdAT
at 0x226
with length only 17 is the missing one. I tried finding information by inspecting the documentation of both APNG and PNG, but cannot find any information about potentially reusing the frame. All other chunks seems also not indicating this reuse.
How to handle this case?
libpng
to read the png, which I then inspected their documentation, but still found nothing about the reuse.Hi
actualliy when run python setup.py install --root=<foo> --optimize
, the test folder is also installed
please leave it out from installation
greetings
Been banging my head on writing an apng extraction myself. It somewhat works, but I run into issues with this file. Looks like your method runs into issues too..
The file was manually edited by the author to set the number of frames to 1. The technique of looking at the chunks themselves obviously gets by that. However, many of the images that get pulled out are corrupt.
My knowledge of PNG isn't the greatest, so I'm not sure if they're corrupt due to some process error in extracting or if they started that way... Either way, both of our extraction approaches cause some of the output files to be errored.
Hi,
Any chance to make pyAPNG
available on Conda Forge?
I've had the same results with Python 2.7 and 3.6.
import apng
method_list = [func for func in dir(apng) if callable(getattr(apng, func))]
print(method_list)
[]
Specifically,
from apng import APNG
"Cannot find reference 'APNG' in apng.py."
Maybe I am missing a dependency? I installed apng from the terminal for 3.6 and using the GUI in PyCharm for 2.7.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.