Comments (3)
Oh that animation is very cool!
Let me think about the implementation of this for a bit. I like the idea of APNG, and it might be feasible to support, at least for a very constrained subset of features. If it seems possible to get a barebones version of this working without much effort I'll give that a shot when I get some time.
For now, I had a similar idea a little while back, and ended up rewriting the project as a command line app in Rust. Check it out: https://github.com/erik/derive.rs
Unfortunately it doesn't work with map tiles right now, but theoretically that could be supported.
edit:
This seems like a good option https://github.com/photopea/UPNG.js
Would need to capture the contents of the canvas as an array of pixels (easy enough) every N datapoints / activities (either user defined or scaled to target a certain length, as @C-Makridis suggested). Probably would want control over output size as well.
from derive.
From a technical point of view, the image could be generated using code such as this: http://javascriptexamples.info/snippet/create-apngjs_qzb_javascript
The time can easily be retrieved from the GPX parser: the code is already there but commented out. However, this is per point: the first point could be taken, but make sure to check for empty paths, which could occur when exporting workouts without location data from Strava.
My concern would be that apngs can be quite huge. A video may be better (but longer to export), with a very low frame rate. I wonder if a timeline/date could be overlaid too? https://github.com/Kagami/webm.js
from derive.
Yeah, I think file size is my main concern. For my derive.rs project, the raw frame data before being converted to a real video format is in the 10s of GB. Using PNG should shrink the file size a bit, but we'd still need to be careful about accidentally blowing up the browser.
For files more than a couple frames, I think you're right about using something like WebM.
@xsanda if you want to take a crack at implementing this, be my guest 🙂
from derive.
Related Issues (20)
- GDPR: Strava's download option has moved HOT 8
- Support FIT files HOT 7
- What window HOT 1
- Not getting the exepcted outcome. HOT 3
- Support GPX routes
- Feature request: blank (white) background, no map
- Feature Request: set directory for files HOT 7
- Feature Request: Mark each individual track. HOT 2
- Support FIT files with developer fields HOT 2
- Feature Request: Use Derive on Quantified-Self.io HOT 4
- Style changes in URL? HOT 5
- Handling of <trkseg> HOT 5
- OpenStreetMap.BlackAndWhite not working HOT 1
- Feature Request: filter by type HOT 4
- How do I import files? HOT 2
- Inconsistency in counting loaded tracks/files HOT 1
- Thank you! HOT 1
- Export as png x2 or more HOT 1
- Feature request: color activities lines by activity type HOT 4
- How do I use this tool HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from derive.