diff options
author | bptato <nincsnevem662@gmail.com> | 2024-04-25 01:06:43 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-04-25 01:20:58 +0200 |
commit | 14b871eb7eaf329b67b71385597f114f8782318a (patch) | |
tree | ac7b4655124b4579ad27d56116d9a2dee63cd31e /src/html/dom.nim | |
parent | 62944ac7abc6e37475739a1667ed5a0240fedf66 (diff) | |
download | chawan-14b871eb7eaf329b67b71385597f114f8782318a.tar.gz |
Initial image support
* png: add missing filters, various decoder fixes * term: fix kitty response interpretation, add support for kitty image detection * buffer, pager: initial image display support Emphasis on "initial"; it only "works" with kitty output and PNG input. Also, it's excruciatingly slow, and repaints images way too often. Left undocumented intentionally it for now, until it actually becomes useful. In the meantime, adventurous users can find out themselves why: [[siteconf]] url = "https://.*" images = true
Diffstat (limited to 'src/html/dom.nim')
-rw-r--r-- | src/html/dom.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 32e98824..76ed9b70 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -2849,7 +2849,7 @@ proc loadResource(window: Window; image: HTMLImageElement) = return let pngData = pngData.get let buffer = cast[ptr UncheckedArray[uint8]](pngData.buffer) - let high = int(pngData.size - 1) + let high = int(pngData.size) - 1 image.bitmap = fromPNG(toOpenArray(buffer, 0, high)) ) window.loadingResourcePromises.add(p) |