about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-06-21 00:05:25 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-21 00:17:03 +0200
commitb8a21c2407a9898a538852098eca5658de5afd37 (patch)
treee41ad69d5473a4775537ed61707d6d31cce5c104 /src/html
parent7f66b5ebc88936db974e3320d77c7ec9d4ab85e6 (diff)
downloadchawan-b8a21c2407a9898a538852098eca5658de5afd37.tar.gz
img, term: try to detect unknown images, improve kitty encoder
* preserve alpha in kitty + simplify encoder
* pass unknown image types to stbi (as image/x-unknown) and let it
  detect the type
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index e6ea61d4..f3fe472d 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -2918,7 +2918,7 @@ proc loadResource(window: Window; image: HTMLImageElement) =
         if res.isNone:
           return
         let response = res.get
-        let contentType = response.getContentType()
+        let contentType = response.getContentType("image/x-unknown")
         if contentType.until('/') != "image":
           return
         let request = newRequest(