Expose the option of try_best_compression_for_png
This commit is contained in:
@@ -230,7 +230,7 @@ bool ImageOptimizer::ConfigureWriter() {
|
||||
case IMAGE_PNG:
|
||||
png_config.reset(
|
||||
new PngCompressParams(
|
||||
true /* try best compression */,
|
||||
options_.try_best_compression_for_png(),
|
||||
false /* never use progressive format */));
|
||||
writer_config_.reset(png_config.release());
|
||||
result = true;
|
||||
|
||||
@@ -35,6 +35,10 @@ message ImageOptions {
|
||||
optional int32 max_webp_quality = 9 [ default = 85 ];
|
||||
optional int32 max_webp_animated_quality = 10 [ default = 85 ];
|
||||
optional int32 max_timeout_ms = 11 [ default = -1 ];
|
||||
// When |try_best_compression_for_png| is set to true, the optimizer uses
|
||||
// multiple methods, including the expensive ones, for encoding PNG images.
|
||||
// The smallest output from all methods will be returned.
|
||||
optional bool try_best_compression_for_png = 12 [ default = true ];
|
||||
}
|
||||
|
||||
message ImageDimensions {
|
||||
|
||||
Reference in New Issue
Block a user