gifuct-js

簡単に使えるJavaScript GIFデコーダです。

デモ

デモで、このライブラリを使ったサンプルを確認できます。a01-kanta.gifhttps://github.com/code4fukui/lessergo-puyo// 鯖江市役所西山動物園オープンデータから引用しています。

機能

使い方

GIFファイルをArrayBufferに変換し、parseGIF関数に渡すことで、GIFの情報を取得できます。decompressFrames関数を使うと、各フレームの情報を取得できます。

import { parseGIF, decompressFrames } from 'https://code4fukui.github.io/gifuct-js/src/index.js';

const buff = await (await fetch(gifURL)).arrayBuffer();
const gif = parseGIF(buff);
const frames = decompressFrames(gif, true)
console.log(frames);

ライセンス

MIT License