You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update to oxipng 8
Fix corresponding APIs
* Update types and tests for new options format
* Update README and CHANGELOG
* Clearer Interlacing None option name
NoOp -> Off to indicate that this disables interlacing on output PNG
* v8.0.0
|`level`| Set the optimization level to an integer between 0 and 6 (inclusive) |`int`|`2`|
73
73
|`backup`| Whether the input file should be backed up before writing the output |`bool`|`False`|
74
74
|`fix_errors`| Attempt to fix errors when decoding the input file rather than throwing `PngError`|`bool`|`False`|
75
+
|`check`| Don't actually run any optimizations, just parse the PNG file |`bool`|`False`|
75
76
|`pretend`| Don't actually write any output file, just calculate the best results |`bool`|`False`|
76
77
|`force`| Write to output even if there was no improvement in compression |`bool`|`False`|
77
78
|`preserve_attrs`| Ensure the output file has the same permissions as the input file |`bool`|`False`|
78
79
|`filter`| Which filters to try on the file. Use Use enum values from `oxipng.RowFilter`|`set=[RowFilter.NoOp]`|`{RowFilter.NoOp}`|
79
-
|`interlace`| Whether to change the interlacing type of the file. `0` means disable interlacing. `1` means enable it. `None` means leave as is|`int \| None`|`None`|
80
-
|`alphas`| Alpha filtering strategies to use. Use enum values from `oxipng.AlphaOptim`|`set[AlphaOptim]`|`{AlphaOptim.NoOp}`|
80
+
|`interlace`| Whether to change the interlacing type of the file. `None` will not change current interlacing type |`Interlacing \| None`|`None`|
81
+
|`optimize_alpha`| Whether to allow transparent pixels to be altered to improve compression |`bool`|`False`|
81
82
|`bit_depth_reduction`| Whether to attempt bit depth reduction |`bool`|`True`|
82
83
|`color_type_reduction`| Whether to attempt color type reduction |`bool`|`True`|
83
84
|`palette_reduction`| Whether to attempt palette reduction |`bool`|`True`|
|`use_heuristics`| Whether to use heuristics to pick the best filter and compression. Intended for use with `level=1`|`bool`|`False`|
89
90
|`timeout`| Maximum amount of time to spend (in milliseconds) on optimizations. Further potential optimizations are skipped if the timeout is exceeded |`int \| None`|`None`|
90
91
91
-
### alphas
92
-
93
-
Initialize the `alphas` set with any of the following enum options:
94
-
95
-
-`oxipng.AlphaOptim.NoOp`
96
-
-`oxipng.AlphaOptim.Black`
97
-
-`oxipng.AlphaOptim.White`
98
-
-`oxipng.AlphaOptim.Up`
99
-
-`oxipng.AlphaOptim.Right`
100
-
-`oxipng.AlphaOptim.Down`
101
-
-`oxipng.AlphaOptim.Left`
102
-
103
92
### filter
104
93
105
94
Initialize the `filter` set with any of the following enum options:
@@ -113,6 +102,14 @@ Initialize the `filter` set with any of the following enum options:
113
102
-`oxipng.RowFilter.BigEnt`
114
103
-`oxipng.RowFilter.Brute`
115
104
105
+
### interlace
106
+
107
+
Set `interlace` to `None` to keep existing interlacing or to one of following
108
+
enum options:
109
+
110
+
-`oxipng.Interlacing.Off` (interlace disabled)
111
+
-`oxipng.Interlacing.Adam7` (interlace enabled)
112
+
116
113
### strip
117
114
118
115
Initialize the `strip` option with one of the following static methods in the
0 commit comments