benny- / apng2webp Goto Github PK
View Code? Open in Web Editor NEWConvert apng (animated png's) to animated webp's
License: BSD 3-Clause "New" or "Revised" License
Convert apng (animated png's) to animated webp's
License: BSD 3-Clause "New" or "Revised" License
For first I tried to install all dependencies (on Windows). I already have python version 3.6, already have cmake and webp lib.
So I install msys, add to path, from msys console install all dependencies (pacman commands) + what you wrote to fix dynamic link bug.
But on mingw make command I stucked:
C:\apng2webp-master\apng2webp_dependencies\build>mingw32-make
[ 25%] Building CXX object CMakeFiles/apngdisraw.dir/apngdisraw/apngdis.cpp.obj
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp: In function 'void compose_frame(unsigned char**, unsigned char**, unsigned char, unsigned int, unsigned int)':
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:119:22: error: 'memset' was not declared in this scope
memset(dp, 0, w*4);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:122:25: error: 'memcpy' was not declared in this scope
memcpy(dp, sp, w*4);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:127:25: error: 'memcpy' was not declared in this scope
memcpy(dp, sp, 4);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:142:27: error: 'memcpy' was not declared in this scope
memcpy(dp, sp, 4);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp: In function 'void recalc_crc(unsigned char*, unsigned int)':
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:168:31: error: 'memcpy' was not declared in this scope
memcpy(p + size - 4, &crc, 4);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp: In function 'int LoadAPNG(char*)':
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:197:58: error: 'memcmp' was not declared in this scope
if (fread(sig, 1, 8, f) == 8 && memcmp(sig, header, 8) == 0)
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:260:58: error: 'memcpy' was not declared in this scope
memcpy(frameNext.p, frameCur.p, imagesize);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:275:58: error: 'memcpy' was not declared in this scope
memcpy(frameNext.p, frameCur.p, imagesize);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:278:66: error: 'memset' was not declared in this scope
memset(frameNext.rows[y0 + j] + x0*4, 0, w0*4);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:283:55: error: 'memcpy' was not declared in this scope
memcpy(chunk_ihdr.p + 8, chunk.p + 12, 8);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp: In function 'int main(int, char**)':
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:451:25: error: 'strcpy' was not declared in this scope
strcpy(szPath, szInput);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:470:33: error: 'strcat' was not declared in this scope
strcat(szPath, szOutPrefix+j);
^
C:\apng2webp-master\apng2webp_dependencies\apngdisraw\apngdis.cpp:476:31: error: 'strcat' was not declared in this scope
strcat(szPath, "apngframe");
^
CMakeFiles\apngdisraw.dir\build.make:62: recipe for target 'CMakeFiles/apngdisraw.dir/apngdisraw/apngdis.cpp.obj' failed
mingw32-make[2]: *** [CMakeFiles/apngdisraw.dir/apngdisraw/apngdis.cpp.obj] Error 1
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/apngdisraw.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/apngdisraw.dir/all] Error 2
Makefile:128: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I don't have idea how can I fix it, but anyway I try to continue and install python package and package installed normally:
C:\apng2webp-master>python setup.py install
C:\Python\Python36\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
C:\Python\Python36\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
running install
running bdist_egg
running egg_info
creating apng2webp.egg-info
writing apng2webp.egg-info\PKG-INFO
writing dependency_links to apng2webp.egg-info\dependency_links.txt
writing entry points to apng2webp.egg-info\entry_points.txt
writing requirements to apng2webp.egg-info\requires.txt
writing top-level names to apng2webp.egg-info\top_level.txt
writing manifest file 'apng2webp.egg-info\SOURCES.txt'
reading manifest file 'apng2webp.egg-info\SOURCES.txt'
writing manifest file 'apng2webp.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\apng2webp
copying apng2webp\apng2webp.py -> build\lib\apng2webp
copying apng2webp\__init__.py -> build\lib\apng2webp
creating build\lib\apng2webp\test
copying apng2webp\test\test_apng2webp.py -> build\lib\apng2webp\test
copying apng2webp\test\__init__.py -> build\lib\apng2webp\test
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\apng2webp
copying build\lib\apng2webp\apng2webp.py -> build\bdist.win-amd64\egg\apng2webp
creating build\bdist.win-amd64\egg\apng2webp\test
copying build\lib\apng2webp\test\test_apng2webp.py -> build\bdist.win-amd64\egg\apng2webp\test
copying build\lib\apng2webp\test\__init__.py -> build\bdist.win-amd64\egg\apng2webp\test
copying build\lib\apng2webp\__init__.py -> build\bdist.win-amd64\egg\apng2webp
byte-compiling build\bdist.win-amd64\egg\apng2webp\apng2webp.py to apng2webp.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\apng2webp\test\test_apng2webp.py to test_apng2webp.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\apng2webp\test\__init__.py to __init__.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\apng2webp\__init__.py to __init__.cpython-36.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying apng2webp.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying apng2webp.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying apng2webp.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying apng2webp.egg-info\entry_points.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying apng2webp.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying apng2webp.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
apng2webp.test.__pycache__.test_apng2webp.cpython-36: module references __file__
creating dist
creating 'dist\apng2webp-0.1.1.dev0-py3.6.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing apng2webp-0.1.1.dev0-py3.6.egg
creating c:\python\python36\lib\site-packages\apng2webp-0.1.1.dev0-py3.6.egg
Extracting apng2webp-0.1.1.dev0-py3.6.egg to c:\python\python36\lib\site-packages
Adding apng2webp 0.1.1.dev0 to easy-install.pth file
Installing apng2webp-script.py script to C:\Python\Python36\Scripts
Installing apng2webp.exe script to C:\Python\Python36\Scripts
Installed c:\python\python36\lib\site-packages\apng2webp-0.1.1.dev0-py3.6.egg
Processing dependencies for apng2webp==0.1.1.dev0
Searching for pbs
Reading https://pypi.python.org/simple/pbs/
Downloading https://pypi.python.org/packages/fe/0f/7bae82505a8678de06aed0974dbe24c2f963de55e6d15390f36131fa7cd4/pbs-0.110.tar.gz#md5=89965e2207d76445810ceb0cf2f37039
Best match: pbs 0.110
Processing pbs-0.110.tar.gz
Writing G:\AppData\Local\Temp\easy_install-y2ls4o83\pbs-0.110\setup.cfg
Running pbs-0.110\setup.py -q bdist_egg --dist-dir G:\AppData\Local\Temp\easy_install-y2ls4o83\pbs-0.110\egg-dist-tmp-7nwtvpcr
zip_safe flag not set; analyzing archive contents...
Copying pbs-0.110-py3.6.egg to c:\python\python36\lib\site-packages
Adding pbs 0.110 to easy-install.pth file
Installed c:\python\python36\lib\site-packages\pbs-0.110-py3.6.egg
Finished processing dependencies for apng2webp==0.1.1.dev0
But when I try run any commands include simple -h
, I get an error:
D:\X4\PrintScreen>apng2webp -loop 0 -tmpdir ./tmp ./e2.png ./e2w.webp
Traceback (most recent call last):
File "C:\Python\Python36\Scripts\apng2webp-script.py", line 11, in <module>
load_entry_point('apng2webp==0.1.1.dev0', 'console_scripts', 'apng2webp')()
File "C:\Python\Python36\lib\site-packages\pkg_resources\__init__.py", line 572, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python\Python36\lib\site-packages\pkg_resources\__init__.py", line 2755, in load_entry_point
return ep.load()
File "C:\Python\Python36\lib\site-packages\pkg_resources\__init__.py", line 2408, in load
return self.resolve()
File "C:\Python\Python36\lib\site-packages\pkg_resources\__init__.py", line 2414, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "C:\Python\Python36\lib\site-packages\apng2webp-0.1.1.dev0-py3.6.egg\apng2webp\apng2webp.py", line 14, in <module>
import pbs
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
File "<frozen importlib._bootstrap>", line 630, in _load_backward_compatible
File "C:\Python\Python36\lib\site-packages\pbs-0.110-py3.6.egg\pbs.py", line 575, in __getattr__
File "C:\Python\Python36\lib\site-packages\pbs-0.110-py3.6.egg\pbs.py", line 527, in __missing__
File "C:\Python\Python36\lib\site-packages\pbs-0.110-py3.6.egg\pbs.py", line 265, in _create
pbs.CommandNotFound: __path__
And similar will be if I try to run test on it:
C:\apng2webp-master>python setup.py test
running pytest
running egg_info
writing apng2webp.egg-info\PKG-INFO
writing dependency_links to apng2webp.egg-info\dependency_links.txt
writing entry points to apng2webp.egg-info\entry_points.txt
writing requirements to apng2webp.egg-info\requires.txt
writing top-level names to apng2webp.egg-info\top_level.txt
reading manifest file 'apng2webp.egg-info\SOURCES.txt'
writing manifest file 'apng2webp.egg-info\SOURCES.txt'
running build_ext
============================= test session starts =============================
platform win32 -- Python 3.6.2, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
rootdir: C:\apng2webp-master, inifile:
collected 0 items / 1 errors
=================================== ERRORS ====================================
______________ ERROR collecting apng2webp/test/test_apng2webp.py ______________
apng2webp\test\test_apng2webp.py:9: in <module>
import pbs
<frozen importlib._bootstrap>:961: in _find_and_load
???
<frozen importlib._bootstrap>:950: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:646: in _load_unlocked
???
<frozen importlib._bootstrap>:630: in _load_backward_compatible
???
c:\python\python36\lib\site-packages\pbs-0.110-py3.6.egg\pbs.py:575: in __getattr__
???
c:\python\python36\lib\site-packages\pbs-0.110-py3.6.egg\pbs.py:527: in __missing__
???
c:\python\python36\lib\site-packages\pbs-0.110-py3.6.egg\pbs.py:265: in _create
???
E pbs.CommandNotFound: __path__
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.23 seconds ===========================
So, does I do something wrong? Or it not issue with me? And how can I fix that?
Travis downloads some webp files. Those files are missing.
Culprit: sh package does not work on windows
Solution: rewrite the code so it no longer depend on the sh package. This might not be too much work as I only used sh because I liked - syntactic - sugar.
APNG Disassembler version?
when I finish install and test a apng,but it throw a error text:libpng warning: Application built with libpng-1.4.12 but running with 1.6.34.
What should I do?
Do not depend on undocumented api's.
CI(Continuous Integration) can provide extra check for each commit. Do we need an CI such as travis-ci to build.
I think it's good when you do something refactoring. Write some simple test to make sure each commit works without manural test. For example, we could safely update the dependency and source code changes and create an pull request. If the build can not pass, the PR should be rejected. And this image convertor is good to test(use a set of APNG images and generate animated WebP)
Also we can provide automatically build release(such as auto upload binary build result to GitHub release page)through travis-ci. For Windows binary, because travis-ci does not support, just manural build and upload it.
I support travis-ci for my fork repo and maybe you can have have a try.
repo page: https://github.com/dreampiggy/apng2webp/tree/travis-ci
travis-ci page: https://travis-ci.org/dreampiggy/apng2webp
The original APNG Optimizier 1.2 license is zlib license. But I found that the old version modified apng2webp_apngopt license is LGPL license. I don't know whether these two license is compatible or not. So the 1.4 version I just leave it as LGPL. But maybe we should change back it to original zlib license ?
Additionaly, the original APNG Disassembler 2.6 license is zlib license. And the modified apngdisraw license is also zlib license. So why are these two dependency's license is different ?
This is the only software that I have found convert APNG into WEBP
However it seems pretty outdated also I don't see any quality, compression settings
Can you update it to latest version?
Thank you
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.