Create gifs in clojure!
APACHE-2.0 License
Create gifs in clojure!
Built with FFmpeg and clj-media.
This library is a small wrapper around clj-media
that offers a simplified API for creating GIFs using best practices.
com.phronemophobic/clogif {:mvn/version "1.4"}
(require '[com.phronemophobic.clogif :as gif])
(gif/save-gif!
(gif/graphics->media
(fn [g frameno]
(.setColor g java.awt.Color/white)
(.fillRect g 0 0 100 100)
(.setColor g java.awt.Color/black)
(.drawString g (str "Hello World " frameno) 5 50))
(range 24))
"hello-world.gif")
(require '[membrane.java2d :as java2d]
'[membrane.ui :as ui])
(gif/save-gif!
(gif/graphics->media
java2d/draw-to-graphics
{:width 100
:height 18}
(eduction
(map (fn [frameno]
[(ui/filled-rectangle [1 1 1]
100 18)
(ui/label (str "membrane: " frameno))]))
(range 24)))
"membrane.gif")
Copyright © 2023 Adrian
The contents of this repository may be distributed under the Apache License v2.0 or the GPLv2.