Commit graph

72 commits

Author SHA1 Message Date
Josh Holmer
5f4ddbb8f4 Upgrade dependencies 2017-06-14 18:28:07 -04:00
Josh Holmer
ed3b843dd2 Update rayon and itertools dependencies 2017-05-02 19:29:20 -04:00
Josh Holmer
84cf6b09c2 Run rustfmt since it updated to v0.8.0.
I don't really like the new changes, but we might as well follow along.
2017-03-08 11:14:33 -05: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
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
f4b643d54b Fix clippy lints, now that clippy is working again. Hooray! 2016-12-16 21:24:47 -05:00
Josh Holmer
2810316f4e Reduce certain headers when reducing color type
Fixes #52
2016-12-12 09:57:18 -05:00
Joshua Holmer
bf341dd20f Fix clippy warnings 2016-12-01 22:33:38 -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
Josh Holmer
e0dfbf3533 Enable clippy with dev feature, and fix several clippy lints 2016-08-20 20:47:26 -04:00
Josh Holmer
dbc3d97513 Eliminate many clones 2016-08-19 23:42:04 -04:00
Josh Holmer
d99db3ad23 Convert results to return a PngError
Closes #44
2016-08-16 12:38:09 -04:00
Josh Holmer
64edc9110e Start using quickcheck and add inline hints 2016-07-30 23:14:36 -04:00
Josh Holmer
fa2b5c4ae5 Remove conversion from palette to grayscale
Closes #45
2016-07-26 12:32:43 -04:00
Josh Holmer
7f9ad263ec Refactor code into modules 2016-07-14 11:10:10 -04:00
Josh Holmer
332c27c7d0 Significant refactoring using itertools 2016-07-14 08:10:25 -04:00
Joshua Holmer
2659776bd5 Fix issue for interlacing images smaller than 4px
Fixes #42
2016-05-25 23:10:44 -04:00
Joshua Holmer
ecc19ad5cd Fix bug where interlaced images with certain widths would fail to optimize 2016-05-13 22:11:45 -04:00
Joshua Holmer
1d39714b0f Fix several new clippy lints 2016-05-13 10:46:16 -04:00
Joshua Holmer
566675f0b6 Improve documentation of private API [ci skip] 2016-05-05 15:44:03 -04:00
Joshua Holmer
042e3e2563 Fix new warnings from clippy 2016-05-05 13:40:24 -04:00
Toby Lawrence
bc7de9b734 Add documentation to new public methods for optimizing in-memory. 2016-05-05 12:21:31 -04:00
Toby Lawrence
2573b20966 Add support for optimizing PNGs loaded in-memory.
In keeping with being able to use oxipng as a library, this adds a way
for developers to optimize a PNG already in memory, instead of requiring
  it to exist on disk first.
2016-05-05 07:54:52 -04:00
Joshua Holmer
aaf443fca7 Similarly optimize unfilter mode 2
Unfilter mode 1 can't benefit from this optimization
because it modifies and reads from the same line of data
2016-05-02 15:58:45 -04:00
Joshua Holmer
3652a69255 Optimize filter mode 1 2016-05-02 15:48:21 -04:00
Joshua Holmer
32c35596ea 25% speed improvement in filter mode 2 by using iter instead of for 2016-05-02 14:49:30 -04:00
Joshua Holmer
c0fddfe4e6 Minor compression improvement in interlaced images 2016-05-02 13:54:04 -04:00
Joshua Holmer
a4a5953786 Implement --fix to fix CRC errors in PNG block headers
Closes #5
2016-05-02 09:25:48 -04:00
Joshua Holmer
2e7bfa4ebc Add palette reduction
Closes #11
2016-04-13 23:16:32 -04:00
Joshua Holmer
c78e3213d6 Update crates and fix interlacing issue 2016-04-08 13:37:00 -04:00
Joshua Holmer
1d0ce6fca8 Performance optimizations
Interlacing performance increased by about 50%
Various other minor optimizations throughout the program
2016-04-05 12:08:47 -04:00
Joshua Holmer
9302caed59 Optimize filter mode 5 SAD loop 2016-04-05 10:52:02 -04:00
Joshua Holmer
1fc81ef683 Support interlaced files and allow conversion between interlaced and progressive files
Closes #3
2016-04-04 16:07:46 -04:00
Joshua Holmer
7280ca80ce Fix issues with 2-bit and 1-bit per pixel interlaced images [ci skip] 2016-03-30 21:42:33 -04:00
Joshua Holmer
5740867be5 Work on implementing interlacing [ci skip] 2016-03-29 22:44:21 -04:00
Joshua Holmer
85ea2c21e5 Remove FIXME sections from code
One section can't be improved from what I can gather,
because we have to iterate the number of bits per pixel in advance.

The output section has been refactored to pull the block writing code
into a separate function.

Fixes #19
2016-03-21 12:14:22 -04:00
Joshua Holmer
f1e65067f6 Improve best-filter-per-line heuristic used in filter mode 5
Fixes #16
2016-03-10 14:23:03 -05:00
Joshua Holmer
eba8062ba5 Add documentation to publicly visible areas of lib
Fixes #17
2016-03-08 11:59:37 -05:00
Joshua Holmer
b889c73a3b Make --strip option more versatile
Closes #22
2016-03-05 22:36:31 -05:00
Joshua Holmer
c6452beb12 Select compression and filter modes heuristically for -o1
Closes #21
2016-03-04 15:24:58 -05:00
Joshua Holmer
9a8c3f64b9 Fix alternative filter modes
Fixes #9
2016-03-03 13:52:52 -05:00
Joshua Holmer
3963f8da0a Prefer unreachable over panic where appropriate 2016-03-02 14:16:34 -05:00
Joshua Holmer
9fa55ae34a Fix all bit depth and color reduction tests
Closes #8
2016-03-02 12:40:56 -05:00
Joshua Holmer
6f1a87160a Fix all existing color reduction tests
Fixes #1
2016-02-23 13:28:39 -05:00
Joshua Holmer
d2cd105b1a Fix most of rgba tests 2016-02-22 22:40:17 -05:00
Joshua Holmer
30f03678d2 Fix filtering, passes some more tests 2016-02-21 23:27:19 -05:00
Joshua Holmer
675a28ee32 Correctly save best run
Fixes #10
2016-02-20 14:49:33 -05:00
Joshua Holmer
9d48ae911e A few inconsequential changes 2016-02-20 02:58:51 -05:00