Commit graph

1070 commits

Author SHA1 Message Date
Ryan Oldenburg 1e6070c150 much faster toStraightAlpha 2022-06-14 17:54:02 -05:00
Ryan Oldenburg 104cfb03d6 use names 2022-06-14 17:46:28 -05:00
Ryan Oldenburg fc0a59bbcb fix 2022-06-14 17:05:13 -05:00
Ryan Oldenburg abf67489f1 copy for newImage 2022-06-14 17:04:39 -05:00
Ryan Oldenburg 7c6528983c Merge branch 'gif' 2022-06-14 16:44:44 -05:00
Ryan Oldenburg 249264f927 f 2022-06-14 16:36:08 -05:00
Ryan Oldenburg 9ed2ad32ab started tiff 2022-06-14 16:23:27 -05:00
Ryan Oldenburg 5336ccfc36 andre feedback 2022-06-14 16:17:23 -05:00
Ryan Oldenburg 7a2fb9949b fixed point hits 2022-06-13 22:40:53 -05:00
Ryan Oldenburg d544926ef9 animated gif support 2022-06-13 21:47:39 -05:00
Ryan Oldenburg 550bec6117 f 2022-06-13 21:35:55 -05:00
Ryan Oldenburg 2a8e631ed8 f 2022-06-13 21:35:41 -05:00
Ryan Oldenburg 033c4b5455 convertToImage alternative to newImage for straight alpha image formats 2022-06-13 21:35:06 -05:00
Ryan Oldenburg 97ba8c745f update png crc handling 2022-06-13 21:34:21 -05:00
Ryan Oldenburg 7ed8ec507e quantize prevents leaks with float32 2022-06-10 14:56:57 -05:00
Ryan Oldenburg 58a7e3bcd0 decode png has ptr+len proc 2022-06-09 18:12:46 -05:00
Ryan Oldenburg 7ce724c0fd fix docs 2022-06-09 12:46:58 -05:00
Ryan Oldenburg 7739e5988e update flatty dep 2022-06-09 01:55:05 -05:00
Ryan Oldenburg bd57f72f39 ensure we only ever see one sof 2022-06-08 20:04:18 -05:00
Ryan Oldenburg 5e6103fbc0 decodeImageDimensions(data) and readImageDimensions(path) 2022-06-08 19:53:22 -05:00
Ryan Oldenburg a039c3681b rename 2022-06-08 18:38:03 -05:00
Ryan Oldenburg 96982cd610 rename 2022-06-08 18:37:23 -05:00
Ryan Oldenburg 2c6617f0a0 early exit 2022-06-08 18:36:40 -05:00
Ryan Oldenburg 537f28e5d0 just use copyMem 2022-06-08 18:21:52 -05:00
Ryan Oldenburg 1e092f4ae8 just use copyMem 2022-06-08 18:21:52 -05:00
Ryan Oldenburg 6b843f9404 mask resize 2022-06-08 01:53:55 -05:00
Ryan Oldenburg b3999b0598 var 2022-06-08 01:53:35 -05:00
Ryan Oldenburg 7e483d4a7d no func 2022-06-08 01:39:47 -05:00
Ryan Oldenburg 18b814ec65 no simd for tcc 2022-06-08 01:37:41 -05:00
Ryan Oldenburg f16c8226ef morepretty 2022-06-08 01:36:10 -05:00
Ryan Oldenburg bd5ef4540e f 2022-06-08 01:33:57 -05:00
Ryan Oldenburg 123ac5e555 unused 2022-05-25 23:51:07 -05:00
Ryan Oldenburg 43b776bb94 just follow spec 2022-05-25 23:18:22 -05:00
Ryan Oldenburg 0c075e6774 get -> read 2022-05-25 22:23:37 -05:00
Ryan Oldenburg 8caaca13c0 f 2022-05-25 22:22:42 -05:00
Ryan Oldenburg 583c797b40 move 2022-05-25 22:17:50 -05:00
Ryan Oldenburg b1d111d1bf getBits 2022-05-25 22:17:41 -05:00
Ryan Oldenburg 7b1cd09cd3 getBit endian 2022-05-25 22:09:07 -05:00
Ryan Oldenburg 11bd83b495 f 2022-05-25 21:46:32 -05:00
Ryan Oldenburg fc3b30ccd2 significant mem savings 2022-05-25 21:42:55 -05:00
Ryan Oldenburg 18f8d63e20 fix 2022-05-25 21:08:14 -05:00
Ryan Oldenburg 4dc81592f6 some simd 2022-05-25 20:56:54 -05:00
Ryan Oldenburg 7ca2d51a9b f 2022-05-25 20:09:21 -05:00
Ryan Oldenburg b360b68fe8 f 2022-05-25 19:57:47 -05:00
Ryan Oldenburg 75f630f824 case 2022-05-25 19:41:33 -05:00
Ryan Oldenburg 403a2b95a8 f 2022-05-25 19:39:22 -05:00
Ryan Oldenburg d49ef8be19 f 2022-05-25 19:35:28 -05:00
Ryan Oldenburg 297ddc6c60 f 2022-05-25 19:22:17 -05:00
Ryan Oldenburg 07d16c7c87 f 2022-05-25 19:20:45 -05:00
Ryan Oldenburg 3b67e809c5 f 2022-05-25 19:13:48 -05:00
Ryan Oldenburg 871740a95e fuzz fix 2022-05-25 19:10:38 -05:00
Ryan Oldenburg dd2571d3a6 f 2022-05-25 19:10:24 -05:00
Ryan Oldenburg 102215a611 f 2022-05-25 18:59:52 -05:00
Ryan Oldenburg 5c04aacbe2 better check 2022-05-25 18:57:33 -05:00
Ryan Oldenburg 49acd68ce9 2x faster 2022-05-25 18:54:13 -05:00
Ryan Oldenburg e67f257479 faster 2022-05-25 18:30:48 -05:00
Ryan Oldenburg 268e653b05 no cost 2022-05-25 18:22:49 -05:00
Ryan Oldenburg e9f09a14dd avoid copying data 2022-05-25 18:21:55 -05:00
Ryan Oldenburg c7dd442a30 f 2022-05-23 17:19:05 -05:00
treeform 323df1c34a Add todo comment. 2022-05-22 11:12:58 -07:00
treeform 0f2c937895 readStr and fuzzing. 2022-05-22 11:09:09 -07:00
treeform 6ebd493f94 Fix rotations. 2022-05-22 11:09:09 -07:00
treeform 759f8e3082 Comment. 2022-05-22 11:09:09 -07:00
treeform 419801afa2 Add JPEG exif orientation. 2022-05-22 11:09:09 -07:00
Ryan Oldenburg a08a989a47 parseSvg + newImage(svg) 2022-05-21 20:05:13 -05:00
Ryan Oldenburg 993fa0750e svg ref obj 2022-05-21 19:33:57 -05:00
Ryan Oldenburg 88576efdd3 f 2022-05-21 19:23:46 -05:00
Ryan Oldenburg ce4ac78b5d tmp 2022-05-21 19:19:38 -05:00
Ryan Oldenburg cc93d33ab9 simpler 2022-05-21 19:15:30 -05:00
Ryan Oldenburg a82343b2ee svg fill change 2022-05-21 19:08:14 -05:00
Ryan Oldenburg 3c810c63de simpler api proposal 2022-05-21 18:27:38 -05:00
Ryan Oldenburg b79a31fabf separate parsing from rendering 2022-05-21 18:08:58 -05:00
Ryan Oldenburg d334daf812 more renaming 2022-05-21 17:33:30 -05:00
Ryan Oldenburg 3a27b0de90 SvgCtx -> SvgProperties 2022-05-21 17:31:13 -05:00
Ryan Oldenburg f5d91a1d9a simpler 2022-05-21 17:27:08 -05:00
Ryan Oldenburg db08965bd9 svgctx 2022-05-21 17:21:45 -05:00
Ryan Oldenburg 0f20549d45 f 2022-05-21 17:17:45 -05:00
Ryan Oldenburg 6567a0a8da f 2022-05-21 16:59:04 -05:00
Ryan Oldenburg acc1d6bc93 simpler 2022-05-21 16:42:34 -05:00
treeform 6f2edb0ad3
Merge pull request #421 from treeform/dev
Add TTC Font format.
2022-05-16 21:30:16 -07:00
treeform 536230a391 Use flatty/encode 2022-05-16 20:55:15 -07:00
Ryan Oldenburg 4194c4a677 remove stb, commit to new jpeg 2022-05-16 22:44:33 -05:00
Ryan Oldenburg 3e204e829f ez perf 2022-05-16 22:29:56 -05:00
Ryan Oldenburg 7afea49893 single branch 2022-05-16 19:05:13 -05:00
Ryan Oldenburg e4e94b84f9 f 2022-05-16 18:41:49 -05:00
Ryan Oldenburg 8036516c7d validate 2022-05-16 18:36:56 -05:00
Ryan Oldenburg 30fc7c73c9 reset marker -> restart marker 2022-05-16 18:32:53 -05:00
Ryan Oldenburg 4984513e22 f 2022-05-16 18:25:53 -05:00
Ryan Oldenburg 50090a8800 f 2022-05-16 18:19:06 -05:00
Ryan Oldenburg 34fa05da97 simpler 2022-05-16 18:08:18 -05:00
treeform a46a9ebf12 api changes, encoding fixed. 2022-05-15 12:05:17 -07:00
treeform 655099a64e more ttc 2022-05-14 09:57:50 -07:00
treeform dffe86074f Add TTC parser. 2022-05-14 09:42:22 -07:00
Ryan Oldenburg 01fe732608 f 2022-05-13 00:08:03 -05:00
Ryan Oldenburg 68b9d63ecd f 2022-05-12 23:29:03 -05:00
Ryan Oldenburg 6f6f73382b f 2022-05-12 23:19:15 -05:00
Ryan Oldenburg 8d57ba9103 f 2022-05-12 23:09:37 -05:00
Ryan Oldenburg 86f9f25011 f 2022-05-12 23:02:20 -05:00
Ryan Oldenburg 2991c16c9d f 2022-05-12 22:55:35 -05:00
Ryan Oldenburg 6cfb98553c rename 2022-05-12 22:51:33 -05:00
Ryan Oldenburg f03b2e2ef3 huffman stuff 2022-05-12 22:46:57 -05:00
Ryan Oldenburg c280cd7864 proc 2022-05-12 20:27:18 -05:00
Ryan Oldenburg 3e2f5f3287 f 2022-05-12 19:59:38 -05:00
Ryan Oldenburg 07ec93a7ef shrink overflow+range checks off to just idct 2022-05-12 19:00:36 -05:00
Ryan Oldenburg 01de5d536b rm inline 2022-05-12 17:58:46 -05:00
Ryan Oldenburg 4b97780a54 string, rm encodeJpeg 2022-05-12 17:57:10 -05:00
treeform e694f810d6 Fix for Mask.mask* issue. 2022-05-12 09:25:40 -07:00
treeform aec2c23253 Better magnify. 2022-05-07 17:14:29 -07:00
treeform 1825ab6cd7 Cleanup 2022-05-07 12:06:18 -07:00
treeform a6ea5fe6c2 Simplfy component ordering. 2022-05-07 12:03:03 -07:00
treeform a2b6540f89 {.byaddr.} 2% speed up. 2022-05-07 11:44:46 -07:00
treeform 9c9645598e Fuzzing. 2022-05-07 11:24:54 -07:00
treeform d1780825e3 Ignore int16 overflows. 2022-05-07 11:20:05 -07:00
treeform bc635bc3da clean up 2022-05-07 11:18:58 -07:00
treeform f4cd87b505 Simpler upscaling code. 2022-05-07 11:11:22 -07:00
treeform fdd6f51dde Remove table use. 2022-05-05 10:20:19 -07:00
treeform 5e484ad4ab
Resurrect old nim-native jpeg parser and fix most issues (#414)
* Add new jpeg tests.
* Resurrect old jpeg.
* Fix Jpeg grayscale
* Fix 4:1:1 scaling.
* Better chunk scanner.
* Fight progressive.
* Fight restart markers.
* Jpeg can now parse all of the test files.
* Fuzzing and overflow checks
* Make getBits* the only way to read the bits. 
* Make Quantiziation and IDCT happen only in one place.
* Rename jpg folder to jpeg
2022-05-05 09:19:17 -07:00
Ryan Oldenburg 530e59c8f2 morepretty 2022-04-25 00:20:25 -05:00
Ryan Oldenburg cb33a4076f 4.2.0 updated deps + bindings 2022-04-25 00:16:20 -05:00
Ryan Oldenburg 328116893a clamp paint opacity 2022-04-24 23:37:17 -05:00
treeform 20af3accd1 Use Polygon. 2022-04-01 18:30:43 -07:00
Ryan Oldenburg 971df79a2d check for int overflow 2022-03-29 18:13:36 -05:00
Ryan Oldenburg 64b63d421d check for fenv epsilon instead of literal 0 2022-03-24 12:02:02 -05:00
treeform 2262459b5d
Merge pull request #404 from treeform/dev
Add context base alignment.
2022-03-22 14:12:29 -07:00
treeform d3ee57bab1 Morepretty 2022-03-22 14:09:42 -07:00
treeform b1f9b943f9 Rename. 2022-03-22 14:09:00 -07:00
Ryan Oldenburg 4d5da888f1 f 2022-03-22 15:57:55 -05:00
Ryan Oldenburg dd85e5f9b0 add check for arc step of 0 2022-03-22 15:48:39 -05:00
treeform 2f88f6119a Small changes. 2022-03-22 09:45:03 -07:00
treeform b876feddc8 Add context base alignment. 2022-03-22 09:43:43 -07:00
treeform 0dda63d66d Review. 2022-03-21 19:56:42 -07:00
treeform 897ca0bc7c Formatting 2022-03-21 19:33:53 -07:00
treeform 341b710549 Run textUber though computePaths. 2022-03-21 18:46:43 -07:00
treeform d4e56d3b3b The computeBounds() should take a transform. 2022-03-20 13:36:54 -07:00
treeform 2365004c9c Seperate the idea layout and pixel bounds. 2022-03-20 13:04:31 -07:00
treeform 87397c8bf8 Negative spread without inverts. 2022-03-20 08:54:06 -07:00
treeform 6068a92363 Split invert out. 2022-03-20 08:50:28 -07:00
treeform 42bedda0a7 Fix #372 - Add negative spread. 2022-03-20 08:50:28 -07:00
Ryan Oldenburg 1fe409c8bb restore pop 2022-03-19 16:01:41 -05:00
treeform 84ed4c9b9d Fix for #393 and other polygon improvements. 2022-03-18 13:43:47 -07:00
treeform aeda891540
Merge pull request #396 from treeform/dev
Fix #394 - zero width mask fill.
2022-03-18 13:43:32 -07:00
Anuken 2e6a962a82
Fixed compilation in qoi for 32-bit platforms 2022-03-17 15:41:51 -04:00
treeform 542c8e84fd Fix #394 - zero width mask fill. 2022-03-17 07:32:47 -07:00
Ryan Oldenburg efba29578e 4.0.2 check valid polygon 2022-03-13 15:39:50 -05:00
treeform 1a9ab003c5 Fix #388 2022-03-12 13:38:13 -08:00
Ryan Oldenburg bd5ba5bd59 fix for custom line-heights 2022-02-22 19:15:35 -06:00
Ryan Oldenburg a0618ad9ac f 2022-02-22 17:35:39 -06:00
Ryan Oldenburg f6a7c888fa simpler 2022-02-22 17:05:55 -06:00
treeform 1a89f5d07b
Merge pull request #384 from treeform/dev
The great enum rename.
2022-02-13 22:15:53 -08:00
treeform 3e5926c92c More enum renames. 2022-02-13 20:02:37 -08:00
Ryan Oldenburg 5282caa056 bmp dib decoder 2022-02-13 16:55:10 -06:00
Ryan Oldenburg 17ad1fbbd1 inline 2022-02-12 19:07:19 -06:00
Ryan Oldenburg 97515a3849 invalid 2022-02-12 19:03:34 -06:00
Ryan Oldenburg ccccd883bb rm seq[uint8] 2022-02-12 18:59:13 -06:00
treeform 65b8dad89b Rename HorizontalAlignment, VerticalAlignment and TextCase enum. 2022-02-12 10:51:14 -08:00
treeform 9fdb3b8b0d Rename LineCap and LineJoin enum. 2022-02-12 10:35:19 -08:00
treeform e4805f7c08 Rename WindingRule enum. 2022-02-12 10:29:28 -08:00
treeform 5074e33efc Rename PaintKind enum. 2022-02-12 10:25:28 -08:00
treeform c6f59b9692 Rename BlendMode enum. 2022-02-12 10:18:39 -08:00
treeform e9f9b82bd4 Rename FileFormat enum. 2022-02-12 10:05:05 -08:00
treeform b456c54825
Merge pull request #383 from treeform/dev
Improve bitmap reader.
2022-02-11 21:33:30 -08:00
treeform d250e4be01 Fixed fuzzing. 2022-02-11 21:08:24 -08:00
treeform 81b82e2277 Morepretty 2022-02-11 20:11:01 -08:00
treeform c2350c9642 Fixes. 2022-02-11 20:08:59 -08:00
treeform 4dc50d9778 Read more bmp formats. 2022-02-11 20:08:09 -08:00
treeform ffc1b90c5f Fail when channel maks is 0. 2022-02-11 16:09:38 -08:00
treeform 25bc1116fb Improve bitmap reader. 2022-02-11 14:27:11 -08:00
Ryan Oldenburg e96f5074f5 v2.27 2022-02-11 15:51:00 -06:00
Ryan Oldenburg 295f5788c9 rm seq[uint8] jpg 2022-02-11 15:46:30 -06:00
Ryan Oldenburg 78e23f83d6 fix and re-enable fill optimization 2022-01-30 14:53:12 -06:00
treeform 2da986d0fe Disable fill optimization for now. 2022-01-30 12:15:13 -08:00
Ryan Oldenburg d5b4500758 iterator issue workaorund 2022-01-25 20:26:39 -06:00
Ryan Oldenburg 12636e4e9f very strange issue 2022-01-25 17:04:43 -06:00
Ryan Oldenburg d65fd68161 zippy 0.8.1 2022-01-25 16:48:01 -06:00
Ryan Oldenburg a3c2444339 morepretty 2022-01-20 20:12:10 -06:00
Ryan Oldenburg be57c71c3c ppm consistent style pass 2022-01-20 20:04:13 -06:00
Ryan Oldenburg a4cac14e87 rm pixie/demo 2022-01-19 14:07:47 -06:00
Rasmus Moorats be26fe5193
fix high-depth handling and add a test case 2022-01-10 15:26:20 +02:00
Rasmus Moorats 71016b868e
remove incorrect rgba conversion 2022-01-09 17:43:43 +02:00
Rasmus Moorats 6f654e32bc
remove erroneous debug echo 2022-01-09 17:43:42 +02:00
Rasmus Moorats b136e5b4e2
P3 support
also fixes an issue with header decoder whitespace handling
2022-01-09 17:43:42 +02:00
Rasmus Moorats 0139af545f
add rudimentary PPM decoder 2022-01-09 17:43:42 +02:00
Rasmus Moorats 7679712575
add PPM encoder 2022-01-09 17:43:42 +02:00
Emery Hemingway c553ff640b Mark parseGlyfGlyph prototype as gcsafe 2022-01-06 12:52:58 +01:00
Ryan Oldenburg a0244c98de decodeSvg xml 2022-01-05 17:20:12 -06:00
Ryan Oldenburg 540183a262 f 2022-01-03 17:50:03 -06:00
Ryan Oldenburg 91abc684ad qoi consistent style pass 2022-01-03 17:41:36 -06:00
treeform a8cd3bfd3b
Merge pull request #354 from ehmry/qoi
QOI support
2022-01-03 13:29:29 -08:00
Emery Hemingway 291a0e3a5d QOI support
https://qoiformat.org/
2022-01-03 17:20:00 +01:00
Ryan Oldenburg 1049e74fec f 2022-01-02 18:28:39 -06:00
Ryan Oldenburg aae5c07614 demo use windy + boxy 2022-01-02 18:13:30 -06:00
Ryan Oldenburg 2d3d4c5f95 bugfix 2022-01-02 18:13:30 -06:00
Ryan Oldenburg 34d96df323 3.1.2 bugfix 2021-12-23 14:10:32 -06:00
Ryan Oldenburg 2ab6c7e35c simpler source position when not rotated or scaled 2021-12-16 21:56:06 -06:00
Ryan Oldenburg 11ba8e7af0 3.1.1 bugfix out of bounds 2021-12-16 04:00:56 -06:00
Ryan Oldenburg bfa1f8b3a0 use 2021-12-15 12:27:49 -06:00
Ryan Oldenburg 6ba8ec472f simd draw fast paths 2021-12-15 12:21:34 -06:00
Ryan Oldenburg 2fbff9104b rm this, bugfix 2021-12-15 12:08:36 -06:00
Ryan Oldenburg f7205a6ebe faster packAlphaValues 2021-12-14 19:31:36 -06:00
Ryan Oldenburg 7195d0a74d pack4xAlphaValues 2021-12-14 16:11:40 -06:00