Class WebPWriteParam
-
- All Implemented Interfaces:
public class WebPWriteParam extends ImageWriteParam
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description WebPWriteParam(Locale locale)
-
Method Summary
Modifier and Type Method Description final CompressionTypegetCompressionType()final UnitsetCompressionType(CompressionType compressionType)IntegergetMethod()quality/speed trade-off (0=fast, 6=slower-better) UnitsetMethod(Integer method)quality/speed trade-off (0=fast, 6=slower-better) IntegergetTargetSize()if non-zero, set the desired target size in bytes. UnitsetTargetSize(Integer targetSize)if non-zero, set the desired target size in bytes. FloatgetTargetPSNR()if non-zero, specifies the minimal distortion to try to achieve. UnitsetTargetPSNR(Float targetPSNR)if non-zero, specifies the minimal distortion to try to achieve. IntegergetSegments()maximum number of segments to use UnitsetSegments(Integer segments)maximum number of segments to use IntegergetSnsStrength()Spatial Noise Shaping. UnitsetSnsStrength(Integer snsStrength)Spatial Noise Shaping. IntegergetFilterStrength()range: 0 = off .. UnitsetFilterStrength(Integer filterStrength)range: 0 = off .. IntegergetFilterSharpness()range: 0 = off .. UnitsetFilterSharpness(Integer filterSharpness)range: 0 = off .. IntegergetFilterType()filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0) UnitsetFilterType(Integer filterType)filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0) BooleangetAutoAdjustFilterStrength()Auto adjust filter's strength UnitsetAutoAdjustFilterStrength(Boolean autoAdjustFilterStrength)Auto adjust filter's strength IntegergetAlphaCompressionAlgorithm()Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). UnitsetAlphaCompressionAlgorithm(Integer alphaCompressionAlgorithm)Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). IntegergetAlphaFiltering()Predictive filtering method for alpha plane. UnitsetAlphaFiltering(Integer alphaFiltering)Predictive filtering method for alpha plane. IntegergetAlphaQuality()0: smallest size, 100: lossless. UnitsetAlphaQuality(Integer alphaQuality)0: smallest size, 100: lossless. IntegergetEntropyAnalysisPassCount()Number of entropy-analysis passes UnitsetEntropyAnalysisPassCount(Integer entropyAnalysisPassCount)Number of entropy-analysis passes BooleangetShowCompressed()if true, export the compressed picture back. UnitsetShowCompressed(Boolean showCompressed)if true, export the compressed picture back. IntegergetPreprocessing()Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering UnitsetPreprocessing(Integer preprocessing)Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering IntegergetPartitions()log2(number of token partitions) in 0.. UnitsetPartitions(Integer partitions)log2(number of token partitions) in 0.. IntegergetPartitionLimit()Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation UnitsetPartitionLimit(Integer partitionLimit)Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation BooleangetEmulateJpegSize()If true, compression parameters will be remapped to better match the expected output size from JPEG compression. UnitsetEmulateJpegSize(Boolean emulateJpegSize)If true, compression parameters will be remapped to better match the expected output size from JPEG compression. IntegergetThreadLevel()If non-zero, try and use multi-threaded encoding. UnitsetThreadLevel(Integer threadLevel)If non-zero, try and use multi-threaded encoding. BooleangetLowMemory()If set, reduce memory usage (but increase CPU use). UnitsetLowMemory(Boolean lowMemory)If set, reduce memory usage (but increase CPU use). IntegergetNearLossless()Near lossless encoding 0 = max loss, 100 = off (default) UnitsetNearLossless(Integer nearLossless)Near lossless encoding 0 = max loss, 100 = off (default) BooleangetExact()If non-zero, preserve the exact RGB values under transparent area. UnitsetExact(Boolean exact)If non-zero, preserve the exact RGB values under transparent area. BooleangetUseDeltaPalette()reserved for future lossless feature UnitsetUseDeltaPalette(Boolean useDeltaPalette)reserved for future lossless feature BooleangetUseSharpYUV()if needed, use sharp (and slow) RGB->YUV conversion UnitsetUseSharpYUV(Boolean useSharpYUV)if needed, use sharp (and slow) RGB->YUV conversion IntegergetQMin()minimum permissible quality factor UnitsetQMin(Integer qMin)minimum permissible quality factor IntegergetQMax()maximum permissible quality factor UnitsetQMax(Integer qMax)maximum permissible quality factor FloatgetCompressionQuality()UnitsetCompressionQuality(Float quality)For lossy, 0f gives the smallest size and 1f the largest. UnitsetCompressionType(String compressionType)UnitunsetCompression()-
Methods inherited from class javax.imageio.IIOParam
activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setDestinationType, setSourceBands, setSourceRegion, setSourceSubsampling -
Methods inherited from class javax.imageio.ImageWriteParam
canOffsetTiles, canWriteCompressed, canWriteProgressive, canWriteTiles, getBitRate, getCompressionMode, getCompressionQualityDescriptions, getCompressionQualityValues, getCompressionType, getCompressionTypes, getLocale, getLocalizedCompressionTypeName, getPreferredTileSizes, getProgressiveMode, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTilingMode, isCompressionLossless, setCompressionMode, setProgressiveMode, setTiling, setTilingMode, unsetTiling -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
WebPWriteParam
WebPWriteParam(Locale locale)
-
-
Method Detail
-
getCompressionType
final CompressionType getCompressionType()
-
setCompressionType
final Unit setCompressionType(CompressionType compressionType)
-
getTargetSize
Integer getTargetSize()
if non-zero, set the desired target size in bytes. Takes precedence over the @.setCompressionQuality parameter.
-
setTargetSize
Unit setTargetSize(Integer targetSize)
if non-zero, set the desired target size in bytes. Takes precedence over the @.setCompressionQuality parameter.
-
getTargetPSNR
Float getTargetPSNR()
if non-zero, specifies the minimal distortion to try to achieve. Takes precedence over .setTargetSize.
-
setTargetPSNR
Unit setTargetPSNR(Float targetPSNR)
if non-zero, specifies the minimal distortion to try to achieve. Takes precedence over .setTargetSize.
-
getSegments
Integer getSegments()
maximum number of segments to use
-
setSegments
Unit setSegments(Integer segments)
maximum number of segments to use
-
getSnsStrength
Integer getSnsStrength()
Spatial Noise Shaping. 0=off, 100=maximum.
-
setSnsStrength
Unit setSnsStrength(Integer snsStrength)
Spatial Noise Shaping. 0=off, 100=maximum.
-
getFilterStrength
Integer getFilterStrength()
range: 0 = off .. 100 = strongest
-
setFilterStrength
Unit setFilterStrength(Integer filterStrength)
range: 0 = off .. 100 = strongest
-
getFilterSharpness
Integer getFilterSharpness()
range: 0 = off .. 7 = least sharp
-
setFilterSharpness
Unit setFilterSharpness(Integer filterSharpness)
range: 0 = off .. 7 = least sharp
-
getFilterType
Integer getFilterType()
filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0)
-
setFilterType
Unit setFilterType(Integer filterType)
filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0)
-
getAutoAdjustFilterStrength
Boolean getAutoAdjustFilterStrength()
Auto adjust filter's strength
-
setAutoAdjustFilterStrength
Unit setAutoAdjustFilterStrength(Boolean autoAdjustFilterStrength)
Auto adjust filter's strength
-
getAlphaCompressionAlgorithm
Integer getAlphaCompressionAlgorithm()
Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1.
-
setAlphaCompressionAlgorithm
Unit setAlphaCompressionAlgorithm(Integer alphaCompressionAlgorithm)
Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1.
-
getAlphaFiltering
Integer getAlphaFiltering()
Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.
-
setAlphaFiltering
Unit setAlphaFiltering(Integer alphaFiltering)
Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.
-
getAlphaQuality
Integer getAlphaQuality()
0: smallest size, 100: lossless. Default is 100.
-
setAlphaQuality
Unit setAlphaQuality(Integer alphaQuality)
0: smallest size, 100: lossless. Default is 100.
-
getEntropyAnalysisPassCount
Integer getEntropyAnalysisPassCount()
Number of entropy-analysis passes
-
setEntropyAnalysisPassCount
Unit setEntropyAnalysisPassCount(Integer entropyAnalysisPassCount)
Number of entropy-analysis passes
-
getShowCompressed
Boolean getShowCompressed()
if true, export the compressed picture back. In-loop filtering is not applied.
-
setShowCompressed
Unit setShowCompressed(Boolean showCompressed)
if true, export the compressed picture back. In-loop filtering is not applied.
-
getPreprocessing
Integer getPreprocessing()
Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering
-
setPreprocessing
Unit setPreprocessing(Integer preprocessing)
Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering
-
getPartitions
Integer getPartitions()
log2(number of token partitions) in 0..3. Default is set to 0 for easier progressive decoding.
-
setPartitions
Unit setPartitions(Integer partitions)
log2(number of token partitions) in 0..3. Default is set to 0 for easier progressive decoding.
-
getPartitionLimit
Integer getPartitionLimit()
Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation
-
setPartitionLimit
Unit setPartitionLimit(Integer partitionLimit)
Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation
-
getEmulateJpegSize
Boolean getEmulateJpegSize()
If true, compression parameters will be remapped to better match the expected output size from JPEG compression. Generally, the output size will be similar but the degradation will be lower.
-
setEmulateJpegSize
Unit setEmulateJpegSize(Boolean emulateJpegSize)
If true, compression parameters will be remapped to better match the expected output size from JPEG compression. Generally, the output size will be similar but the degradation will be lower.
-
getThreadLevel
Integer getThreadLevel()
If non-zero, try and use multi-threaded encoding.
-
setThreadLevel
Unit setThreadLevel(Integer threadLevel)
If non-zero, try and use multi-threaded encoding.
-
getLowMemory
Boolean getLowMemory()
If set, reduce memory usage (but increase CPU use).
-
setLowMemory
Unit setLowMemory(Boolean lowMemory)
If set, reduce memory usage (but increase CPU use).
-
getNearLossless
Integer getNearLossless()
Near lossless encoding 0 = max loss, 100 = off (default)
-
setNearLossless
Unit setNearLossless(Integer nearLossless)
Near lossless encoding 0 = max loss, 100 = off (default)
-
getExact
Boolean getExact()
If non-zero, preserve the exact RGB values under transparent area. Otherwise, discard this invisible RGB information for better compression. The default value is false.
-
setExact
Unit setExact(Boolean exact)
If non-zero, preserve the exact RGB values under transparent area. Otherwise, discard this invisible RGB information for better compression. The default value is false.
-
getUseDeltaPalette
Boolean getUseDeltaPalette()
reserved for future lossless feature
-
setUseDeltaPalette
Unit setUseDeltaPalette(Boolean useDeltaPalette)
reserved for future lossless feature
-
getUseSharpYUV
Boolean getUseSharpYUV()
if needed, use sharp (and slow) RGB->YUV conversion
-
setUseSharpYUV
Unit setUseSharpYUV(Boolean useSharpYUV)
if needed, use sharp (and slow) RGB->YUV conversion
-
getCompressionQuality
Float getCompressionQuality()
-
setCompressionQuality
Unit setCompressionQuality(Float quality)
For lossy, 0f gives the smallest size and 1f the largest. For lossless, this parameter is the amount of effort put into the compression: 0f is the fastest but gives larger files compared to the slowest, but best, 1f.
-
setCompressionType
Unit setCompressionType(String compressionType)
-
unsetCompression
Unit unsetCompression()
-
-
-
-