X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=sixel.git;a=blobdiff_plain;f=sixel.el;h=ed46c7623541b2f37b5a17eef8bf88e4f4d5a00f;hp=2539356fd1904797306834c056622476079bea0a;hb=4bf40dd7d7f41b3669e8e44c85ca4bd9a0bd6fb4;hpb=a524f51da9e67c1f7048b00ab934b8061251341b diff --git a/sixel.el b/sixel.el index 2539356..ed46c76 100644 --- 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 +;; 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" @@ -5,7 +20,6 @@ "#2??GG????-" "#1!14@")) - (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)))) -(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) @@ -90,4 +94,7 @@ with TAG." (goto-char (match-end 0))) (push (reverse this-row) rows) - (reverse rows)))) + (list color-map + (reverse rows))))) + +;; sixel.el ends here