Add S-expression based video effects pipeline with modular effect definitions, constructs, and recipe files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15 lines
664 B
Common Lisp
15 lines
664 B
Common Lisp
;; ASCII Art effect - converts image to ASCII characters
|
|
;; @param char_size int [4, 32] default 8
|
|
;; @param alphabet string default "standard"
|
|
;; @param color_mode string default "color"
|
|
;; @param contrast float [1, 3] default 1.5
|
|
;; @param background list default (0 0 0)
|
|
|
|
(define-effect ascii_art
|
|
((char_size 8) (alphabet "standard") (color_mode "color") (contrast 1.5) (background (list 0 0 0)))
|
|
(let* ((sample (cell-sample frame char_size))
|
|
(colors (nth sample 0))
|
|
(luminances (nth sample 1))
|
|
(chars (luminance-to-chars luminances alphabet contrast)))
|
|
(render-char-grid frame chars colors char_size color_mode background)))
|