Ingvar Stepanyan
23ae9c302f
Switch to standard logging library ( #218 )
...
This allows to configure or compile away logging in the library from a single place in Rust apps.
For the CLI side, the usage and output remained the same, except it's now colour-coded.
Fixes #217 .
2020-04-18 18:33:48 -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
Ingvar Stepanyan
121558bf5c
Add libdeflater as an option ( #203 )
...
libdeflater is a Rust wrapper around
[libdeflate](https://github.com/ebiggers/libdeflate ) - an alternative
heavily optimised library for deflate/zlib/gzip compression and
decompression that is intended for situations where upper bounds of the
output are well-known.
In my benchmarks on test files in the repo it has shown to be usually
both slightly faster and providing better compressed output than
cloudflare-zlib, but in some cases showing the opposite, so rather
than swapping defaults, it's currently provided as another option,
similarly to zopfli.
Since it's not strictly better in all cases, I'm not providing median
numbers, but you can check distribution histograms for time and size
differences here (all using `oxipng -o 6 -t 6 -P`):
https://docs.google.com/spreadsheets/d/1WOKgeYZBhLkQvMGAC36snN4azilElzOFhx63RJu0EZY/edit?usp=sharing
2020-03-31 20:24:57 -04:00
Felix Hanau
4adcc5e14a
Interlacing fixes ( #182 )
...
* Fix decoding interlaced images with height or width <= 2
* Add Issue 175 test case
* Deinterlace tiny images correctly
2019-07-24 09:16:13 -04:00
Felix Hanau
56b94542a6
Fix decoding interlaced images with height or width <= 2 ( #175 )
2019-06-27 13:44:34 -04:00
Josh Holmer
c60bd82da7
Add test case for #171
2019-06-20 14:07:47 -04:00
Josh Holmer
9d8ce5e4ee
Disable large image test for 32-bit systems
...
Closes #176
2019-06-20 13:38:59 -04:00
Felix Hanau
5dcfe44ccd
Fix info message and typos ( #172 )
2019-06-18 13:06:37 -04:00
Josh Holmer
7bd7c0cfc9
Bump image crate to handle large images
...
Closes #167 and #168
2019-03-26 14:14:01 -04:00
Josh Holmer
d86bc80f43
Prepare for next release
2019-02-01 17:27:03 -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
Josh Holmer
918c52eed8
Fix more nonstandard sBIT headers
...
Closes #153
2018-12-02 00:13:30 -05:00
Josh Holmer
7594ec632b
Add test file
2018-12-01 22:32:29 -05:00
Joshua Holmer
1305b5cf17
Fix clippy lints and run rustfmt
2018-11-26 13:41:14 -05:00
Joshua Holmer
041c433ccb
Handle non-standard sBIT headers
...
Closes #141
2018-11-26 13:10:21 -05:00
Kornel
686adcdebd
Optimize RGB/A to palette conversion ( #148 )
2018-11-22 21:52:02 -05:00
Kornel
96eda85806
Identify and drop useless sRGB profiles ( #143 )
2018-11-13 14:37:02 -05:00
Joshua Holmer
87e738dda2
Fix incorrect detection of images that can reduce bit depth
...
Closes #140
2018-10-11 08:29:48 -04:00
Kornel
3c466df80e
Chunk name as 4 bytes ( #135 )
2018-09-16 16:09:55 -04:00
Josh Holmer
bb1737928e
Fix RGB to Indexed reduction if transparency pixel exists
...
Closes #129
2018-08-11 23:33:55 -04:00
Josh Holmer
71d0f6fa31
Fix more issues with alpha optim on interlaced images
...
Closes #133
2018-08-11 20:27:45 -04:00
Matthias Krüger
947ccaad04
fix more clippy warnings found by "cargo clippy --all-targets --all-features" ( #130 )
2018-08-02 23:19:42 -04:00
Josh Holmer
7303b94afc
Fix issue with alpha optim on interlaced images
...
Closes #113
2018-07-27 23:03:36 -04:00
Josh Holmer
d110949d2a
Version 2.0.0
2018-07-20 19:19:20 -04:00
Kornel
c530bba261
--keep option ( #121 )
2018-07-17 23:55:21 -04:00
Kornel
c99b3778b2
Expose only one internal module specifically for tests ( #123 )
...
Closes #98
2018-07-17 23:38:11 -04:00
Kornel
cb52d8466a
Reading from stdin ( #118 )
2018-07-12 07:54:06 -04:00
Kornel
ebf541219c
DRYyer tests ( #117 )
2018-07-10 22:38:49 -04:00
Kornel
55a095d536
Enum for stdout writing flag ( #110 )
2018-07-10 18:41:06 -04:00
Kornel
e83762d3b1
Remove deprecated Error::description ( #109 )
2018-07-06 07:26:49 -04:00
Josh Holmer
4d81e23542
Fix the benchmarking script to not overwrite the test file
2018-01-19 18:29:41 -05:00
Josh Holmer
9de0eeaf51
Compare performance of oxipng vs optipng
...
This adds a script to automate this process and add it to the README.
I'll just run it manually after a version release, for now.
Closes #81
2018-01-18 13:58:05 -05:00
Josh Holmer
e3ba535a79
Add some changes and fixes around how the output file is handled
...
See changelog for details
2018-01-10 20:54:15 -05:00
Josh Holmer
88f5bb0931
Hide modules from documentation, and only export structs used in options or return types
2018-01-10 10:37:01 -05:00
Josh Holmer
f8c62de6c0
Fix unfiltering of first scan line in each pass of an interlaced input file
...
Closes #92
2017-12-23 00:36:41 -05:00
Josh Holmer
4d62f9f7f9
Fix failure to optimize on certain grayscale images
...
Closes #89
2017-11-21 12:38:33 -05:00
Emiel Beinema
b417e2bde7
Return an error when an APNG header is encountered
2017-09-30 23:50:52 +02:00
Josh Holmer
e17f911334
Fix a bug in palette reduction at less than 8 bits per pixel
...
Closes #82
2017-09-11 18:27:28 -04:00
Josh Holmer
e3a26b77a4
Fix a bug in reducing palettes with a bit depth of two
...
Closes #80
2017-09-10 23:26:39 -04:00
Josh Holmer
0db03c6faf
Fix new clippy lints
2017-09-03 23:36:38 -04:00
Josh Holmer
f41ef551d3
Enable option for multiple alpha transformations
2017-07-26 00:37:55 -04:00
Josh Holmer
413f1aac7c
Automatically change transparent pixels to black
2017-07-24 08:47:27 -04:00
Josh Holmer
d18850ebab
Ignore color reductions that would increase file size
...
Closes #61
2017-03-08 10:11:13 -05:00
Josh Holmer
6c8e7d253d
Verify images are correct before outputting them, and fix a bug in certain images
...
Closes #60
2017-03-06 20:16:28 -05:00
Josh Holmer
c79ba3ab8a
Version 0.14.4
2017-02-26 22:53:23 -05:00
Josh Holmer
87810829ce
Fix issues in transparency palette reduction and release version 0.14.3
2017-02-25 23:33:55 -05:00
Josh Holmer
44818a854b
Fix two bugs in reducing palette and release version 0.14.2
2017-02-22 15:45:46 -05:00
Josh Holmer
2810316f4e
Reduce certain headers when reducing color type
...
Fixes #52
2016-12-12 09:57:18 -05:00
Josh Holmer
6d49d7b8f9
Implement zopfli compression, available as a CLI flag (-Z)
...
Improves compression by about 10% over DEFLATE, but takes a very long
time at the moment, so it is off by default.
2016-12-01 12:51:30 -05:00