davidmz / apng-canvas Goto Github PK
View Code? Open in Web Editor NEWAPNG implementation on canvas.
Home Page: https://davidmz.github.io/apng-canvas/
License: MIT License
APNG implementation on canvas.
Home Page: https://davidmz.github.io/apng-canvas/
License: MIT License
Hello,when i write this to do my work. I find it doesn't work.
JS and apng is successful introduction,but it not work.
console reminds me error:"http://www.xxxx.com/undefined"!
so,what happend?
I'm original questioner of this stackoverflow article.
https://stackoverflow.com/questions/67660696/can-the-latest-openlayers-render-the-animated-marker-using-gif-apng-webp
The point is, old style web map engine uses div+img elements for the markers on the map, so animated XXX type image can be used for animated marker.
But the modern web map engine uses canvas or even webgl, so it became tough to realize animated marker.
I want to make it easy by creating some libraries for updating canvas context on each frame.
But I have less knowledge about such other formats like animated gif / SVG, so I'm not sure similar approach with your library can be used for such formats.
Do you give me advise if it is worse to customize this library for them or not, if you know?
If it is worse, I'll try to customize...
I would like to be able to stop an animation. If simply removing the canvas from the DOM, the animation is still running in the background, calculating the frames. Is there a way to stop a specific image animation, or all animations completely?
when we use apng-canvas v2.1.0, it appears Garbled character in pages ( happens on Android System v6.0 )
When the apng of an acyclic animation is used, there is no problem with the first loading, and then the animation with < img > appended disappears
`function addImg() {
var imgD = new Image();
imgD.src = ""
document.body.appendChild(imgD)
}
setInterval(function() {
addImg();
}, 3000)
`
when I try to install with yarn:
yarn install apng-canvas
I get an error:
error Received malformed response from registry for "apng-canvas". The registry may be down.
I can successfully install apng-js like this with yarn install apng-js
Hi,
I use this library on android webview,
but It's not working and no error message,
any idea?
I see you have make a commit to fix the problem "pageProtocol always being false" via 1ae5740
But the build version file, "apng-canvas.min.js" was still have the problem.
Pls build a new work in process version :)
Great works! I learned a lot from this lib. Right now, I am trying to make apng from a png list. However, I encountered some problems. I would like to know your implement, could you enlighten me?
I'm having an issue running this on my local machine from files (getting CORS issues). You wrote that this is a known issue but I need it to work nonetheless. Any idea how to get this work on my local machine with Chrome WITHOUT running a server just to add the Access-Control-Allow-Origin header? Is there a reason why the files are fetched using XHR instead of simply getting them from a path?
How hard would it be to encode APNGs in the browser? I'm doing it now with animated GIFs (http://meemoo.org/iframework/#/example/cam2gif thanks to https://github.com/antimatter15/jsgif), but it would be nice to have 8-bit alpha.
var xhr = new XMLHttpRequest();
xhr.open('GET', img.src, true);
xhr.overrideMimeType('text/plain; charset=x-user-defined'); //binary XHR FTW? Probably XHR2 has binary xhr powers
xhr.onload = function(){
var binary = xhr.responseText.split('').map(function(e){return String.fromCharCode(e.charCodeAt(0) & 0xff)}).join('');
}
xhr.send(null);
Can you create an extension to give Edge ability to play APNG?
Works great on desktop but on Android Chrome the images only animate once, if you refresh they are static images.
Any ideas?
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.