mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-17 08:10:36 +01:00
- ensured also PNG file are scaled when rendering the gemtext.
This commit is contained in:
parent
676cf0759f
commit
8486e6eea4
@ -448,6 +448,9 @@
|
||||
(defun scale-targa (main-window file)
|
||||
(scale-pixmap main-window file 'nodgui.pixmap:tga))
|
||||
|
||||
(defun scale-png (main-window file)
|
||||
(scale-pixmap main-window file 'nodgui.pixmap:png))
|
||||
|
||||
(defun inline-image (main-window link-value line-index)
|
||||
(multiple-value-bind (file-path mime-type)
|
||||
(slurp-iri main-window (remove-standard-port link-value))
|
||||
@ -456,6 +459,8 @@
|
||||
(scale-jpeg main-window file-path))
|
||||
((member mime-type '("image/x-tga" "image/x-targa"))
|
||||
(scale-targa main-window file-path))
|
||||
((string= mime-type +mime-type-png+)
|
||||
(scale-png main-window file-path))
|
||||
(t
|
||||
(gui:make-image file-path))))
|
||||
(coordinates `(+ (:line ,line-index :char 0) 1 :lines)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user