Class WebPWriteParam
-
- All Implemented Interfaces:
public final 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)final IntegergetMethod()quality/speed trade-off (0=fast, 6=slower-better) final UnitsetMethod(Integer method)quality/speed trade-off (0=fast, 6=slower-better) final IntegergetTargetSize()if non-zero, set the desired target size in bytes. final UnitsetTargetSize(Integer targetSize)if non-zero, set the desired target size in bytes. final FloatgetTargetPSNR()if non-zero, specifies the minimal distortion to try to achieve. final UnitsetTargetPSNR(Float targetPSNR)if non-zero, specifies the minimal distortion to try to achieve. final IntegergetSegments()maximum number of segments to use final UnitsetSegments(Integer segments)maximum number of segments to use final IntegergetSnsStrength()Spatial Noise Shaping. final UnitsetSnsStrength(Integer snsStrength)Spatial Noise Shaping. final IntegergetFilterStrength()range: 0 = off .. final UnitsetFilterStrength(Integer filterStrength)range: 0 = off .. final IntegergetFilterSharpness()range: 0 = off .. final UnitsetFilterSharpness(Integer filterSharpness)range: 0 = off .. final IntegergetFilterType()filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0) final UnitsetFilterType(Integer filterType)filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0) final BooleangetAutoAdjustFilterStrength()Auto adjust filter's strength final UnitsetAutoAdjustFilterStrength(Boolean autoAdjustFilterStrength)Auto adjust filter's strength final IntegergetAlphaCompressionAlgorithm()Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). final UnitsetAlphaCompressionAlgorithm(Integer alphaCompressionAlgorithm)Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). final IntegergetAlphaFiltering()Predictive filtering method for alpha plane. final UnitsetAlphaFiltering(Integer alphaFiltering)Predictive filtering method for alpha plane. final IntegergetAlphaQuality()0: smallest size, 100: lossless. final UnitsetAlphaQuality(Integer alphaQuality)0: smallest size, 100: lossless. final IntegergetEntropyAnalysisPassCount()Number of entropy-analysis passes final UnitsetEntropyAnalysisPassCount(Integer entropyAnalysisPassCount)Number of entropy-analysis passes final BooleangetShowCompressed()if true, export the compressed picture back. final UnitsetShowCompressed(Boolean showCompressed)if true, export the compressed picture back. final IntegergetPreprocessing()Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering final UnitsetPreprocessing(Integer preprocessing)Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering final IntegergetPartitions()log2(number of token partitions) in 0.. final UnitsetPartitions(Integer partitions)log2(number of token partitions) in 0.. final IntegergetPartitionLimit()Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation final UnitsetPartitionLimit(Integer partitionLimit)Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation final BooleangetEmulateJpegSize()If true, compression parameters will be remapped to better match the expected output size from JPEG compression. final UnitsetEmulateJpegSize(Boolean emulateJpegSize)If true, compression parameters will be remapped to better match the expected output size from JPEG compression. final IntegergetThreadLevel()If non-zero, try and use multi-threaded encoding. final UnitsetThreadLevel(Integer threadLevel)If non-zero, try and use multi-threaded encoding. final BooleangetLowMemory()If set, reduce memory usage (but increase CPU use). final UnitsetLowMemory(Boolean lowMemory)If set, reduce memory usage (but increase CPU use). final IntegergetNearLossless()Near lossless encoding 0 = max loss, 100 = off (default) final UnitsetNearLossless(Integer nearLossless)Near lossless encoding 0 = max loss, 100 = off (default) final BooleangetExact()If non-zero, preserve the exact RGB values under transparent area. final UnitsetExact(Boolean exact)If non-zero, preserve the exact RGB values under transparent area. final BooleangetUseDeltaPalette()reserved for future lossless feature final UnitsetUseDeltaPalette(Boolean useDeltaPalette)reserved for future lossless feature final BooleangetUseSharpYUV()if needed, use sharp (and slow) RGB->YUV conversion final UnitsetUseSharpYUV(Boolean useSharpYUV)if needed, use sharp (and slow) RGB->YUV conversion final IntegergetQMin()minimum permissible quality factor final UnitsetQMin(Integer qMin)minimum permissible quality factor final IntegergetQMax()maximum permissible quality factor final 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
final Integer getTargetSize()
if non-zero, set the desired target size in bytes. Takes precedence over the @.setCompressionQuality parameter.
-
setTargetSize
final Unit setTargetSize(Integer targetSize)
if non-zero, set the desired target size in bytes. Takes precedence over the @.setCompressionQuality parameter.
-
getTargetPSNR
final Float getTargetPSNR()
if non-zero, specifies the minimal distortion to try to achieve. Takes precedence over .setTargetSize.
-
setTargetPSNR
final Unit setTargetPSNR(Float targetPSNR)
if non-zero, specifies the minimal distortion to try to achieve. Takes precedence over .setTargetSize.
-
getSegments
final Integer getSegments()
maximum number of segments to use
-
setSegments
final Unit setSegments(Integer segments)
maximum number of segments to use
-
getSnsStrength
final Integer getSnsStrength()
Spatial Noise Shaping. 0=off, 100=maximum.
-
setSnsStrength
final Unit setSnsStrength(Integer snsStrength)
Spatial Noise Shaping. 0=off, 100=maximum.
-
getFilterStrength
final Integer getFilterStrength()
range: 0 = off .. 100 = strongest
-
setFilterStrength
final Unit setFilterStrength(Integer filterStrength)
range: 0 = off .. 100 = strongest
-
getFilterSharpness
final Integer getFilterSharpness()
range: 0 = off .. 7 = least sharp
-
setFilterSharpness
final Unit setFilterSharpness(Integer filterSharpness)
range: 0 = off .. 7 = least sharp
-
getFilterType
final Integer getFilterType()
filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0)
-
setFilterType
final Unit setFilterType(Integer filterType)
filtering type: 0 = simple, 1 = strong (only used if filter_strength 0 or autofilter 0)
-
getAutoAdjustFilterStrength
final Boolean getAutoAdjustFilterStrength()
Auto adjust filter's strength
-
setAutoAdjustFilterStrength
final Unit setAutoAdjustFilterStrength(Boolean autoAdjustFilterStrength)
Auto adjust filter's strength
-
getAlphaCompressionAlgorithm
final Integer getAlphaCompressionAlgorithm()
Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1.
-
setAlphaCompressionAlgorithm
final Unit setAlphaCompressionAlgorithm(Integer alphaCompressionAlgorithm)
Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1.
-
getAlphaFiltering
final Integer getAlphaFiltering()
Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.
-
setAlphaFiltering
final Unit setAlphaFiltering(Integer alphaFiltering)
Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1.
-
getAlphaQuality
final Integer getAlphaQuality()
0: smallest size, 100: lossless. Default is 100.
-
setAlphaQuality
final Unit setAlphaQuality(Integer alphaQuality)
0: smallest size, 100: lossless. Default is 100.
-
getEntropyAnalysisPassCount
final Integer getEntropyAnalysisPassCount()
Number of entropy-analysis passes
-
setEntropyAnalysisPassCount
final Unit setEntropyAnalysisPassCount(Integer entropyAnalysisPassCount)
Number of entropy-analysis passes
-
getShowCompressed
final Boolean getShowCompressed()
if true, export the compressed picture back. In-loop filtering is not applied.
-
setShowCompressed
final Unit setShowCompressed(Boolean showCompressed)
if true, export the compressed picture back. In-loop filtering is not applied.
-
getPreprocessing
final Integer getPreprocessing()
Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering
-
setPreprocessing
final Unit setPreprocessing(Integer preprocessing)
Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering
-
getPartitions
final Integer getPartitions()
log2(number of token partitions) in 0..3. Default is set to 0 for easier progressive decoding.
-
setPartitions
final Unit setPartitions(Integer partitions)
log2(number of token partitions) in 0..3. Default is set to 0 for easier progressive decoding.
-
getPartitionLimit
final Integer getPartitionLimit()
Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation
-
setPartitionLimit
final Unit setPartitionLimit(Integer partitionLimit)
Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation
-
getEmulateJpegSize
final 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
final 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
final Integer getThreadLevel()
If non-zero, try and use multi-threaded encoding.
-
setThreadLevel
final Unit setThreadLevel(Integer threadLevel)
If non-zero, try and use multi-threaded encoding.
-
getLowMemory
final Boolean getLowMemory()
If set, reduce memory usage (but increase CPU use).
-
setLowMemory
final Unit setLowMemory(Boolean lowMemory)
If set, reduce memory usage (but increase CPU use).
-
getNearLossless
final Integer getNearLossless()
Near lossless encoding 0 = max loss, 100 = off (default)
-
setNearLossless
final Unit setNearLossless(Integer nearLossless)
Near lossless encoding 0 = max loss, 100 = off (default)
-
getExact
final 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
final 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
final Boolean getUseDeltaPalette()
reserved for future lossless feature
-
setUseDeltaPalette
final Unit setUseDeltaPalette(Boolean useDeltaPalette)
reserved for future lossless feature
-
getUseSharpYUV
final Boolean getUseSharpYUV()
if needed, use sharp (and slow) RGB->YUV conversion
-
setUseSharpYUV
final 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()
-
-
-
-