Commit graph

83 commits

Author SHA1 Message Date
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
Josh Holmer
d99db3ad23 Convert results to return a PngError
Closes #44
2016-08-16 12:38:09 -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
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