<script type="module">
import {reverse, split} from 'gifken'
const imageUrl = '/01_Koch-Kurve-Sechseck-alt._Def.-2.gif'
const response = await fetch(imageUrl)
const buffer = await response.arrayBuffer()
const results = await split(new Uint8Array(buffer))
for (const result of results) {
const img = new Image()
img.src = URL.createObjectURL(new Blob([result], {type: 'image/gif'}))
document.body.append(img)
}
</script>
const {readFileSync, writeFileSync} = require('fs')
const gifken = require('gifken')
gifken
.reverse(readFileSync('./assets/01_Koch-Kurve-Sechseck-alt._Def.-2.gif'))
.then(result => {
writeFileSync('reverse.gif', result)
})
To build gifken, following tools are required
- Node.js >=14
- npm >=8
- Cargo
- wasm-bindgen
git clone *thisrepo*
cd gifken
npm install
npm run build
MIT