andrews05
b846a2e909
Try to pick tRNS value that's valid at low depth ( #520 )
2023-07-07 20:56:15 -04:00
andrews05
ea5f1884be
Refactor aux chunk handling ( #505 )
2023-05-21 15:34:23 -04:00
andrews05
c97572be3e
ColorType Refactor ( #500 )
...
* Refactor ColorType
Move transparency and palette data into the ColorType
* Fixup tests
* Make more use of helper functions
* Change BitDepth to u8 representation with TryFrom
* Fix clippy lints
* Don't use unstable language features
* Restore documentation on transparency/palette
2023-04-27 19:49:54 -04:00
andrews05
a3b104a2ed
Faster reductions ( #479 )
...
* Add grayscale depth tests and benches
* Don't include filter byte in PngImage.data
* Simplify reductions by not using scan lines
* Faster grayscale reduction
* Simplify reduce_color_type
* Faster depth reduction
2022-12-22 16:56:36 -05:00
andrews05
2008d09915
Reduce alpha to tRNS ( #477 )
2022-12-13 15:18:19 -05:00
andrews05
131a3c6af7
🚀 Revamp alpha optimisation ( #475 )
2022-12-10 21:14:50 -05:00
andrews05
6022fc2aa1
Refactor use_heuristics for fast filter evaluation ( #463 )
2022-12-02 05:34:38 -05:00
andrews05
420d904ba9
Strengthen alpha reductions ( #460 )
...
* Improve up and left alpha reductions
* Disable alpha down and right by default
* Improve performance of up
2022-11-01 19:13:24 -04:00
andrews05
a02d4ff0dd
Fix directional alpha reductions ( #458 )
...
* Fix alpha up and down
* Fix alpha left and right
2022-10-28 19:41:44 -04:00
Kornel
17212477c5
Avoid asserts panicking on broken files
2021-01-20 14:33:27 -05:00
Josh Holmer
0d9c23f4ce
Fix new clippy lints from Rust 1.47
2020-10-09 20:20:52 -04:00
Josh Holmer
43735086d1
Migrate to Github Actions
...
Closes #206
2020-04-15 13:26:28 -04:00
Ingvar Stepanyan
878bbedb37
Improve performance consistency ( #202 )
...
* Improve performance consistency
Switch from HashMap / HashSet to IndexMap / IndexSet for consistent iteration order of various options and, as a result, more predictable performance.
2020-03-31 21:54:05 -04:00
Kornel
681089f8c7
Remove the concept of size bias ( #199 )
...
Closes #198
2020-03-31 19:28:22 -04:00
Josh Holmer
0e3c0b922d
Enable more clippy lints and fix some clippy issues
2020-01-19 05:22:14 -05:00
Daniel Wong
4cb26d462e
Allow disabling all alpha optimizations ( #181 )
...
Fixes a bug where oxipng would crash if alpha optimizations were all disabled.
2019-07-23 14:21:46 -04:00
Kamal Ahmad
34ee78dbbc
Preallocate memory in reduced_alpha_to_up ( #180 )
2019-06-27 13:44:49 -04:00
Josh Holmer
d86bc80f43
Prepare for next release
2019-02-01 17:27:03 -05:00
Kornel
dad6230cf1
Check timeout more often during compression ( #160 )
2019-02-01 16:30:47 -05:00
Kornel
33890cf0fd
Fake Rayon ( #162 )
...
Dummy implementation of Rayon's traits to avoid `#[cfg()]` and duplicated non-parallel code.
2019-01-28 13:35:42 -05:00
Kornel
9af874d21b
Make reductions return a new uncompressed image ( #158 )
...
* Fix verbose message
* No cloning when restoring original data
* Make reductions return a new uncompressed image
Partially fixes #145
* Async reduction evaluator
* Assert
* Faster bit depth check
* Also try 4-bit depth for small-depth images
* Skip test when using miniz
* Ensure palette is trimmed after depth reduction
Fixes #159
* Fudge factor for reductions to prefer better reductions even if gzip estimation says otherwise
2019-01-27 03:22:49 -05:00
Kornel
55d85df9fc
Non-self-mutable reductions ( #154 )
...
* Move reductions to a module. Make copy instead of changing in-place.
* Alpha reductions
* Immutable color reductions
* Immutable interlace reductions
2019-01-12 05:07:57 -05:00
Josh Holmer
918c52eed8
Fix more nonstandard sBIT headers
...
Closes #153
2018-12-02 00:13:30 -05:00
Joshua Holmer
041c433ccb
Handle non-standard sBIT headers
...
Closes #141
2018-11-26 13:10:21 -05:00
Kornel
3c466df80e
Chunk name as 4 bytes ( #135 )
2018-09-16 16:09:55 -04:00
Josh Holmer
f862a0df24
Apply clippy fixes
2018-07-28 16:51:54 -04:00
Kornel
76a2e51c15
Reduce allocations ( #122 )
...
* Iterate with fewer temp allocations
* Avoid allocation when not reducing
* Avoid slow modulo
2018-07-20 18:40:51 -04:00
Josh Holmer
ece85e6d15
Refactoring of internal code into smaller chunks.
...
There is still more to be done.
2018-01-30 09:35:03 -05:00