The Lambda Lab
/
projects
/
sixel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a524f51
)
Added boiler-plate package stuff.
author
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 19 May 2019 20:32:04 +0000
(22:32 +0200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 19 May 2019 20:32:04 +0000
(22:32 +0200)
sixel.el
patch
|
blob
|
history
diff --git
a/sixel.el
b/sixel.el
index
2539356
..
ed46c76
100644
(file)
--- a/
sixel.el
+++ b/
sixel.el
@@
-1,3
+1,18
@@
+;;; sixel.el --- minor mode for processing sixel graphics
+
+;; Copyright (C) 2019 Tim Vaughan
+
+;; Author: Tim Vaughan <tgvaughan@gmail.com>
+;; Created: 19 May 2019
+;; Version: 1.0.0
+;; Keywords:
+;; Homepage: https://github.com/tgvaughan/sixel
+;; Package-Requires: ((emacs "25"))
+
+;;; Commentary:
+
+;;; Code:
+
(defvar test-string
(concat "q"
"#0;2;0;0;0#1;2;100;100;0#2;2;0;100;0"
(defvar test-string
(concat "q"
"#0;2;0;0;0#1;2;100;100;0#2;2;0;100;0"
@@
-5,7
+20,6
@@
"#2??GG????-"
"#1!14@"))
"#2??GG????-"
"#1!14@"))
-
(defun sixel-get-params (string)
"Retrieve the sixel parameters."
(car (split-string string "q")))
(defun sixel-get-params (string)
"Retrieve the sixel parameters."
(car (split-string string "q")))
@@
-14,16
+28,6
@@
"Retrieve data string."
(substring string (1+ (string-match "q" string))))
"Retrieve data string."
(substring string (1+ (string-match "q" string))))
-(defun sixel-compute-row-length (string)
- (apply 'max
- (mapcar
- (lambda (substr)
- (apply 'max (mapcar
- (lambda (subsubstr)
- (length (subsubstr)))
- (split-string substr "$"))))
- (split-string string -))))
-
(defun sixel-tag-bits (sixel n tag)
"Set bits of SIXEL corresponding to N with to the value TAG."
(dotimes (i 6)
(defun sixel-tag-bits (sixel n tag)
"Set bits of SIXEL corresponding to N with to the value TAG."
(dotimes (i 6)
@@
-90,4
+94,7
@@
with TAG."
(goto-char (match-end 0)))
(push (reverse this-row) rows)
(goto-char (match-end 0)))
(push (reverse this-row) rows)
- (reverse rows))))
+ (list color-map
+ (reverse rows)))))
+
+;; sixel.el ends here