Package com.luciad.imageio.webp
Class WebPWriteParam
java.lang.Object
javax.imageio.IIOParam
javax.imageio.ImageWriteParam
com.luciad.imageio.webp.WebPWriteParam
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class javax.imageio.ImageWriteParam
canOffsetTiles, canWriteCompressed, canWriteProgressive, canWriteTiles, compressionMode, compressionQuality, compressionType, compressionTypes, locale, MODE_COPY_FROM_METADATA, MODE_DEFAULT, MODE_DISABLED, MODE_EXPLICIT, preferredTileSizes, progressiveMode, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, tilingMode, tilingSetFields inherited from class javax.imageio.IIOParam
controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintbooleanfloatbooleanintbooleangetExact()intintintbooleanintintintintintintgetQMax()intgetQMin()intbooleanintfloatintintbooleanbooleanvoidsetAlphaCompressionAlgorithm(int aAlphaCompressionAlgorithm) Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless).voidsetAlphaFiltering(int aAlphaFiltering) Predictive filtering method for alpha plane.voidsetAlphaQuality(int aAlphaQuality) 0: smallest size, 100: lossless.voidsetAutoAdjustFilterStrength(boolean value) Auto adjust filter's strengthvoidsetCompressionQuality(float quality) For lossy, 0f gives the smallest size and 1f the largest.voidsetCompressionType(String compressionType) voidsetEmulateJpegSize(boolean value) If true, compression parameters will be remapped to better match the expected output size from JPEG compression.voidsetEntropyAnalysisPassCount(int aEntropyAnalysisPassCount) Number of entropy-analysis passesvoidsetExact(boolean value) If non-zero, preserve the exact RGB values under transparent area.voidsetFilterSharpness(int aFilterSharpness) range: [0 = off ..voidsetFilterStrength(int aFilterStrength) range: [0 = off ..voidsetFilterType(int aFilterType) filtering type: 0 = simple, 1 = strong (only used if filter_strength > 0 or autofilter > 0)voidsetLowMemory(boolean aLowMemory) If set, reduce memory usage (but increase CPU use).voidsetMethod(int aMethod) quality/speed trade-off (0=fast, 6=slower-better)voidsetNearLossless(int aNearLossless) Near lossless encoding 0 = max loss, 100 = off (default)voidsetPartitionLimit(int aPartitionLimit) Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradationvoidsetPartitions(int aPartitions) log2(number of token partitions) in [0..3].voidsetPreprocessing(int aPreprocessing) Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random ditheringvoidsetQMax(int aQMax) maximum permissible quality factorvoidsetQMin(int aQMin) minimum permissible quality factorvoidsetSegments(int aSegments) maximum number of segments to usevoidsetShowCompressed(boolean value) if true, export the compressed picture back.voidsetSnsStrength(int aSnsStrength) Spatial Noise Shaping.voidsetTargetPSNR(float aTargetPSNR) if non-zero, specifies the minimal distortion to try to achieve.voidsetTargetSize(int aTargetSize) if non-zero, set the desired target size in bytes.voidsetThreadLevel(int aThreadLevel) If non-zero, try and use multi-threaded encoding.voidsetUseDeltaPalette(boolean value) reserved for future lossless featurevoidsetUseSharpYUV(boolean value) if needed, use sharp (and slow) RGB->YUV conversionvoidMethods 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, unsetTilingMethods inherited from class javax.imageio.IIOParam
activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setDestinationType, setSourceBands, setSourceRegion, setSourceSubsampling
-
Field Details
-
LOSSY_COMPRESSION
public static final int LOSSY_COMPRESSION- See Also:
-
LOSSLESS_COMPRESSION
public static final int LOSSLESS_COMPRESSION- See Also:
-
-
Constructor Details
-
WebPWriteParam
-
-
Method Details
-
getCompressionQuality
public float getCompressionQuality()- Overrides:
getCompressionQualityin classImageWriteParam
-
setCompressionQuality
public void setCompressionQuality(@FloatRange(from=0.0,to=1.0) 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.- Overrides:
setCompressionQualityin classImageWriteParam
-
setCompressionType
- Overrides:
setCompressionTypein classImageWriteParam
-
unsetCompression
public void unsetCompression()- Overrides:
unsetCompressionin classImageWriteParam
-
getMethod
public int getMethod() -
setMethod
public void setMethod(@IntRange(from=0L,to=6L) int aMethod) quality/speed trade-off (0=fast, 6=slower-better) -
getTargetSize
public int getTargetSize() -
setTargetSize
public void setTargetSize(int aTargetSize) if non-zero, set the desired target size in bytes. Takes precedence over the @setCompressionQuality(float)parameter. -
getTargetPSNR
public float getTargetPSNR() -
setTargetPSNR
public void setTargetPSNR(float aTargetPSNR) if non-zero, specifies the minimal distortion to try to achieve. Takes precedence oversetTargetSize(int). -
getSegments
public int getSegments() -
setSegments
public void setSegments(@IntRange(from=1L,to=4L) int aSegments) maximum number of segments to use -
getSnsStrength
public int getSnsStrength() -
setSnsStrength
public void setSnsStrength(@IntRange(from=0L,to=100L) int aSnsStrength) Spatial Noise Shaping. 0=off, 100=maximum. -
getFilterStrength
public int getFilterStrength() -
setFilterStrength
public void setFilterStrength(@IntRange(from=0L,to=100L) int aFilterStrength) range: [0 = off .. 100 = strongest] -
getFilterSharpness
public int getFilterSharpness() -
setFilterSharpness
public void setFilterSharpness(@IntRange(from=0L,to=7L) int aFilterSharpness) range: [0 = off .. 7 = least sharp] -
getFilterType
public int getFilterType() -
setFilterType
public void setFilterType(@IntRange(from=0L,to=1L) int aFilterType) filtering type: 0 = simple, 1 = strong (only used if filter_strength > 0 or autofilter > 0) -
getAutoAdjustFilterStrength
public boolean getAutoAdjustFilterStrength() -
setAutoAdjustFilterStrength
public void setAutoAdjustFilterStrength(boolean value) Auto adjust filter's strength -
getAlphaCompressionAlgorithm
public int getAlphaCompressionAlgorithm() -
setAlphaCompressionAlgorithm
public void setAlphaCompressionAlgorithm(@IntRange(from=0L,to=1L) int aAlphaCompressionAlgorithm) Algorithm for encoding the alpha plane (0 = none, 1 = compressed with WebP lossless). Default is 1. -
getAlphaFiltering
public int getAlphaFiltering() -
setAlphaFiltering
public void setAlphaFiltering(@IntRange(from=0L,to=2L) int aAlphaFiltering) Predictive filtering method for alpha plane. 0: none, 1: fast, 2: best. Default if 1. -
getAlphaQuality
public int getAlphaQuality() -
setAlphaQuality
public void setAlphaQuality(@IntRange(from=0L,to=100L) int aAlphaQuality) 0: smallest size, 100: lossless. Default is 100. -
getEntropyAnalysisPassCount
public int getEntropyAnalysisPassCount() -
setEntropyAnalysisPassCount
public void setEntropyAnalysisPassCount(@IntRange(from=1L,to=10L) int aEntropyAnalysisPassCount) Number of entropy-analysis passes -
getShowCompressed
public boolean getShowCompressed() -
setShowCompressed
public void setShowCompressed(boolean value) if true, export the compressed picture back. In-loop filtering is not applied. -
getPreprocessing
public int getPreprocessing() -
setPreprocessing
public void setPreprocessing(@IntRange(from=0L,to=2L) int aPreprocessing) Preprocessing filter 0=none, 1=segment-smooth, 2=pseudo-random dithering -
getPartitions
public int getPartitions() -
setPartitions
public void setPartitions(@IntRange(from=0L,to=3L) int aPartitions) log2(number of token partitions) in [0..3]. Default is set to 0 for easier progressive decoding. -
getPartitionLimit
public int getPartitionLimit() -
setPartitionLimit
public void setPartitionLimit(@IntRange(from=0L,to=100L) int aPartitionLimit) Quality degradation allowed to fit the 512k limit on prediction modes coding 0: no degradation, 100: maximum possible degradation -
getEmulateJpegSize
public boolean getEmulateJpegSize() -
setEmulateJpegSize
public void setEmulateJpegSize(boolean value) 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
public int getThreadLevel() -
setThreadLevel
public void setThreadLevel(int aThreadLevel) If non-zero, try and use multi-threaded encoding. -
getLowMemory
public boolean getLowMemory() -
setLowMemory
public void setLowMemory(boolean aLowMemory) If set, reduce memory usage (but increase CPU use). -
getNearLossless
public int getNearLossless() -
setNearLossless
public void setNearLossless(@IntRange(from=0L,to=100L) int aNearLossless) Near lossless encoding 0 = max loss, 100 = off (default) -
getExact
public boolean getExact() -
setExact
public void setExact(boolean value) 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
public boolean getUseDeltaPalette() -
setUseDeltaPalette
public void setUseDeltaPalette(boolean value) reserved for future lossless feature -
getUseSharpYUV
public boolean getUseSharpYUV() -
setUseSharpYUV
public void setUseSharpYUV(boolean value) if needed, use sharp (and slow) RGB->YUV conversion -
getQMin
public int getQMin() -
setQMin
public void setQMin(int aQMin) minimum permissible quality factor -
getQMax
public int getQMax() -
setQMax
public void setQMax(int aQMax) maximum permissible quality factor
-