-
public final class WebPConfigConfiguration options for the WebP encoder.
The WebPConfig data class provides various options to configure the encoding process for WebP images. These options allow you to control the encoding parameters such as lossless/lossy encoding, quality, compression method, target size, segmentation, filtering, alpha channel encoding, preprocessing, multi-threading, memory usage, and more.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classWebPConfig.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integerlosslessprivate final Floatqualityprivate final Integermethodprivate final IntegertargetSizeprivate final FloattargetPSNRprivate final Integersegmentsprivate final IntegersnsStrengthprivate final IntegerfilterStrengthprivate final IntegerfilterSharpnessprivate final IntegerfilterTypeprivate final BooleanautoFilterprivate final IntegeralphaCompressionprivate final IntegeralphaFilteringprivate final IntegeralphaQualityprivate final Integerpassprivate final BooleanshowCompressedprivate final Integerpreprocessingprivate final Integerpartitionsprivate final IntegerpartitionLimitprivate final BooleanemulateJPEGSizeprivate final IntegerthreadLevelprivate final BooleanlowMemoryprivate final IntegernearLosslessprivate final Booleanexactprivate final BooleanuseDeltaPaletteprivate final BooleanuseSharpYUVprivate final Integerqminprivate final Integerqmax
-
Constructor Summary
Constructors Constructor Description WebPConfig(Integer lossless, Float quality, Integer method, Integer targetSize, Float targetPSNR, Integer segments, Integer snsStrength, Integer filterStrength, Integer filterSharpness, Integer filterType, Boolean autoFilter, Integer alphaCompression, Integer alphaFiltering, Integer alphaQuality, Integer pass, Boolean showCompressed, Integer preprocessing, Integer partitions, Integer partitionLimit, Boolean emulateJPEGSize, Integer threadLevel, Boolean lowMemory, Integer nearLossless, Boolean exact, Boolean useDeltaPalette, Boolean useSharpYUV, Integer qmin, Integer qmax)
-
Method Summary
Modifier and Type Method Description final IntegergetLossless()final FloatgetQuality()final IntegergetMethod()final IntegergetTargetSize()final FloatgetTargetPSNR()final IntegergetSegments()final IntegergetSnsStrength()final IntegergetFilterStrength()final IntegergetFilterSharpness()final IntegergetFilterType()final BooleangetAutoFilter()final IntegergetAlphaCompression()final IntegergetAlphaFiltering()final IntegergetAlphaQuality()final IntegergetPass()final BooleangetShowCompressed()final IntegergetPreprocessing()final IntegergetPartitions()final IntegergetPartitionLimit()final BooleangetEmulateJPEGSize()final IntegergetThreadLevel()final BooleangetLowMemory()final IntegergetNearLossless()final BooleangetExact()final BooleangetUseDeltaPalette()final BooleangetUseSharpYUV()final IntegergetQmin()final IntegergetQmax()-
-
Constructor Detail
-
WebPConfig
WebPConfig(Integer lossless, Float quality, Integer method, Integer targetSize, Float targetPSNR, Integer segments, Integer snsStrength, Integer filterStrength, Integer filterSharpness, Integer filterType, Boolean autoFilter, Integer alphaCompression, Integer alphaFiltering, Integer alphaQuality, Integer pass, Boolean showCompressed, Integer preprocessing, Integer partitions, Integer partitionLimit, Boolean emulateJPEGSize, Integer threadLevel, Boolean lowMemory, Integer nearLossless, Boolean exact, Boolean useDeltaPalette, Boolean useSharpYUV, Integer qmin, Integer qmax)
- Parameters:
lossless- Enables or disables lossless encoding.quality- Specifies the quality factor for lossy encoding.method- Specifies the compression method to be used.targetSize- Specifies the desired target size in bytes for the output image.targetPSNR- Specifies the desired target PSNR (Peak Signal-to-Noise Ratio) value for the output image.segments- Specifies the number of segments to use for multi-threaded encoding.snsStrength- Specifies the strength of the spatial noise shaping.filterStrength- Specifies the strength of the deblocking filter.filterSharpness- Specifies the sharpness of the deblocking filter.filterType- Specifies the filtering type.autoFilter- Controls the automatic filtering strength.alphaCompression- Specifies the compression method for the alpha channel.alphaFiltering- Specifies the predictive filtering method for the alpha channel.alphaQuality- Specifies the quality factor for lossy alpha encoding.pass- Specifies the number of entropy analysis passes.showCompressed- If true, export the compressed picture back.preprocessing- Specifies the preprocessing filter to be applied to the input image.partitions- log2(number of token partitions) in 0..partitionLimit- Specifies the maximum number of bytes to use for the internal partition size.emulateJPEGSize- If set to true, tries to emulate the compression behavior of JPEG.threadLevel- If non-zero, specifies the level of effort to use for multi-threaded encoding.lowMemory- If set to true, reduces memory usage but at the cost of increased CPU usage.nearLossless- Specifies the level of near lossless encoding.exact- If set to true, preserves exact RGB values under transparent areas.useDeltaPalette- If set to true, enables the use of delta palette encoding.useSharpYUV- If set to true, uses a sharp RGB to YUV conversion method.qmin- Specifies the minimum permissible quality factor.qmax- Specifies the maximum permissible quality factor.
-
-
Method Detail
-
getLossless
final Integer getLossless()
-
getQuality
@FloatRange(from = 0.0.toDouble(), to = 100.0.toDouble()) final Float getQuality()
-
getTargetSize
final Integer getTargetSize()
-
getTargetPSNR
final Float getTargetPSNR()
-
getSegments
@IntRange(from = 1.toLong(), to = 4.toLong()) final Integer getSegments()
-
getSnsStrength
@IntRange(from = 0.toLong(), to = 100.toLong()) final Integer getSnsStrength()
-
getFilterStrength
@IntRange(from = 0.toLong(), to = 100.toLong()) final Integer getFilterStrength()
-
getFilterSharpness
@IntRange(from = 0.toLong(), to = 7.toLong()) final Integer getFilterSharpness()
-
getFilterType
final Integer getFilterType()
-
getAutoFilter
final Boolean getAutoFilter()
-
getAlphaCompression
final Integer getAlphaCompression()
-
getAlphaFiltering
final Integer getAlphaFiltering()
-
getAlphaQuality
@IntRange(from = 0.toLong(), to = 100.toLong()) final Integer getAlphaQuality()
-
getShowCompressed
final Boolean getShowCompressed()
-
getPreprocessing
final Integer getPreprocessing()
-
getPartitions
@IntRange(from = 0.toLong(), to = 3.toLong()) final Integer getPartitions()
-
getPartitionLimit
@IntRange(from = 0.toLong(), to = 100.toLong()) final Integer getPartitionLimit()
-
getEmulateJPEGSize
final Boolean getEmulateJPEGSize()
-
getThreadLevel
final Integer getThreadLevel()
-
getLowMemory
final Boolean getLowMemory()
-
getNearLossless
@IntRange(from = 0.toLong(), to = 100.toLong()) final Integer getNearLossless()
-
getUseDeltaPalette
final Boolean getUseDeltaPalette()
-
getUseSharpYUV
final Boolean getUseSharpYUV()
-
-
-
-