Comments (4)
You can't add raw image URLs with addFrame which expects a canvas object. One way to do this is by creating a canvas context and calling drawImage with the data URL
Sent from my iPhone
On Jun 19, 2014, at 11:12 AM, kinduff [email protected] wrote:
If I add a frame with a Data URI it generates a black gif.
To reproduce
Modify clock.html demo at line 127:
uridata = canvas.toDataURL('image/png');
encoder.addFrame(uridata, true);
Data URI is generated good, you can see it if you add console.log(uridata) and the end.Did I missed something from the docs, tho?
—
Reply to this email directly or view it on GitHub.
from jsgif.
@antimatter15 I read at the README file that:
You can set the second parameter to true and pass a imageData.data-esque array as your first argument.
How can I generate this imageData.data-esque
?
from jsgif.
my guess is
var fauxImageData = {
width: 320,
height: 75,
data: [...], // `Uint8Array` or `Uint8ClampedArray` of subpixels
};
from jsgif.
@leeoniya Thanks!
from jsgif.
Related Issues (20)
- No license information HOT 1
- `addFrame` with `is_imageData=true` makes Chrome hang up HOT 3
- Writing canvas to GIF outputs double speed GIF HOT 1
- License HOT 1
- last frame of addFrame is not added to gif HOT 1
- jsapng? can you make convas into animated PNG? HOT 5
- GIF almost empty HOT 4
- Animated Gif comes out black w/ Web Workers HOT 6
- Pixel width black line on left edge of GIF
- Add git tag
- My webcam snapshot is being overlay by the gif ??
- No plugin.xml file
- Color Reproduction Issue HOT 2
- Fixes report HOT 1
- Global color map HOT 2
- Crashes at 300+ Frames HOT 2
- License? HOT 2
- The encoding of the Gif fails depending on the size of the canvas HOT 1
- Background image shown in canvas but not in image output HOT 7
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 jsgif.