about summary refs log tree commit diff stats
path: root/src/img/png.nim
Commit message (Collapse)AuthorAgeFilesLines
* png: fix check in readU8bptato2024-04-271-1/+1
| | | | i + 1 must be > reader.limit, so >= is needed to avoid the addition
* png: fix indexed color with tRNSbptato2024-04-271-5/+7
|
* color: RGBAColor -> ARGBColorbptato2024-04-261-5/+5
|
* Remove unnecessary unsigned castsbptato2024-04-261-16/+16
| | | | | Unsigned operations and conversions to unsigned types always wrap/narrow without checks, so no need to manually mask/cast/etc. them.
* png: fix off by onebptato2024-04-251-3/+1
| | | | + remove outdated comment
* Initial image supportbptato2024-04-251-18/+49
| | | | | | | | | | | | | | | | | * 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
* Update code stylebptato2024-04-171-49/+49
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* Remove unnecessary std/math importsbptato2024-04-081-5/+3
|
* Allow non-RGB colors in CSSbptato2024-02-241-1/+1
| | | | | | | | | | | The -cha-ansi color type now sets ANSI colors in CSS. Also, color correction etc. has been improved a bit: * don't completely reset output state in processFormat for new colors * defaultColor is now separated from ANSI color type 0 * bright ANSI colors are no longer replaced with bold + dark variant * replaced ANSI color map to match xterm defaults
* Use std/* imports everywherebptato2024-01-071-1/+1
|
* Compile with styleCheck:usagesbptato2023-12-281-2/+2
| | | | much better
* warn on eprint in release modebptato2023-10-211-1/+2
| | | | Maybe it's easier to avoid accidentally including like this
* png: print zstream errorsbptato2023-07-041-1/+5
|
* png: fix grayscale regressionbptato2023-06-291-1/+1
| | | | it's 0x1, not 0x11. oops
* png: fix 4 bit grayscale & <8 bit indexed colorbptato2023-06-251-6/+17
|
* Make Result.text, json return promisebptato2023-06-131-1/+0
|
* Fix various layout bugs, prepare for image supportbptato2023-06-121-3/+3
|
* Add indexed color, other png improvementsbptato2023-06-091-22/+71
|
* Refactor bitmap, add png color modesbptato2023-06-061-0/+413
Now PNG encoding/decoding, painting, etc. are done in separate files. Plus we support all color modes except indexed color.