newtykip / canvas-gif Goto Github PK
View Code? Open in Web Editor NEW๐ผ๏ธ Manipulate GIFs easily using node-canvas!
License: Other
๐ผ๏ธ Manipulate GIFs easily using node-canvas!
License: Other
ability to rotate an image, i guess
This issue provides visibility into Renovate updates and their statuses. Learn more
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
How To Make Transparent Gif Background
import canvasGif from "canvas-gif"
import fs from "fs"
const gifUrl = "https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif"
const makeGif = async () => {
const response = await fetch(gifUrl)
const arrayBuffer = await response.arrayBuffer()
canvasGif(Buffer.from(arrayBuffer), (ctx, width, height, totalFrames, currentFrame) => {
ctx.fillStyle = "#fff"
ctx.font = "30px 'Fira Code Retina'"
ctx.fillText("this is epic!?!", 50, 100)
ctx.fillText(`Frame ${currentFrame}/${totalFrames}`, 50, 300)
}, {}).then((buffer) => {
fs.writeFileSync("./output.gif", buffer)
console.log("Done!")
})
}
makeGif()
How can I fix the distortion? Also, is there a way to set the fps the same as the original gif? The problem isn't Buffer.from(arrayBuffer)
because when I write that to ./output.gif
directly, there is no distortion.
seems like an interesting project but can you let me know what features you support?
I'd like to overlay some images and text onto an animated GIF (eg memegenerator) is that possible?
ive been thinking of using a URL for my loads, though of asking if theres a way to load via URL instead of file directory
I'm too much of a noob to understand how to use this package and I would appreciate a small example to guide me.
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.