public class OptimizerConfig extends Object
| Constructor and Description |
|---|
OptimizerConfig()
Defaults for usage in tests.
|
OptimizerConfig(int maxInMemoryBytes,
int maxPaletteSize,
boolean jpegConversionAllowed,
float jpegCompression,
int minThresholdBytes,
boolean jpegHuffmanOptimization,
boolean jpegRetainSubsampling) |
| Modifier and Type | Method and Description |
|---|---|
float |
getJpegCompression()
The compression ratio to use when compressing JPEG images
A value between 0.5 and 0.9.
|
boolean |
getJpegHuffmanOptimization()
Indicate if we want to do huffman optimization while enocding the jpeg's.
|
boolean |
getJpegRetainSubsampling()
Indicate if we want to do retian original jpeg subsampling while encoding the jpeg's.
|
int |
getMaxInMemoryBytes()
The maximum allowed in-memory size of a parsed image.
|
int |
getMaxPaletteSize()
The maximum no.
|
int |
getMinThresholdBytes()
The threshold in bytes below which we do not attempt to rewite
an image.
|
boolean |
isJpegConversionAllowed()
Allow conversion from and to JPEG for other image types that are fully opaque.
|
@Inject
public OptimizerConfig(int maxInMemoryBytes,
int maxPaletteSize,
boolean jpegConversionAllowed,
float jpegCompression,
int minThresholdBytes,
boolean jpegHuffmanOptimization,
boolean jpegRetainSubsampling)
public OptimizerConfig()
public int getMaxInMemoryBytes()
public int getMaxPaletteSize()
public boolean isJpegConversionAllowed()
public float getJpegCompression()
public int getMinThresholdBytes()
public boolean getJpegHuffmanOptimization()
public boolean getJpegRetainSubsampling()
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.