Class WebPWriteParam


public class WebPWriteParam extends ImageWriteParam
  • Field Details

  • Constructor Details

    • WebPWriteParam

      public WebPWriteParam(Locale aLocale)
  • Method Details

    • getCompressionQuality

      public float getCompressionQuality()
      Overrides:
      getCompressionQuality in class ImageWriteParam
    • 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:
      setCompressionQuality in class ImageWriteParam
    • setCompressionType

      public void setCompressionType(String compressionType)
      Overrides:
      setCompressionType in class ImageWriteParam
    • unsetCompression

      public void unsetCompression()
      Overrides:
      unsetCompression in class ImageWriteParam
    • 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 over setTargetSize(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