peanutbuttergif
v1.0.1
Published
Comfiest GIF Decoder for the Web!
Downloads
5
Maintainers
Readme
PeanutButterGIF Comfiest GIF Decoder for the Web!
Special thanks to @AlcaDesign for the help in getting Gifuct-js library packaged into a parcel and parsing the frames!
JSGif
We built this GIF decoder live on Twitch on Instafluff!
Instafluff
Like these projects? The best way to support my open-source projects is by becoming a Comfy Sponsor on GitHub!
https://github.com/sponsors/instafluff
Come and hang out with us at the Comfiest Corner on Twitch!
https://twitch.tv/instafluff
Instructions
- Download and add
pbgif.min.js
from thedist
folder or include from the JSDelivr CDN:
<script src="pbgif.min.js"></script>
OR
<script src="https://cdn.jsdelivr.net/npm/peanutbuttergif@latest/dist/pbgif.min.js"></script>
- Get the GIF frames by calling
await fetchGif( url )
and that's it!
For Example:
( async () => {
let gifData = await fetchGif( "https://media.giphy.com/media/6E5UgTuvUR0b3OLgWV/giphy.gif" );
console.dir( gifData );
})();
Example rendering of the pixel data to canvas is in dist/example.html