peanutbuttergif

1.0.1 • Public • Published

PeanutButterGIF Comfiest GIF Decoder for the Web!

npm GitHub

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

  1. Download and add pbgif.min.js from the dist 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>
  1. 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

Package Sidebar

Install

npm i peanutbuttergif

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

47.5 kB

Total Files

8

Last publish

Collaborators

  • instafluff