ImageMagick: WebP Encoding Options
Author: ImageMagick Studio LLC
Description: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition, resize, rotate, shear, distort or transform images automagically.
Keywords: webp, encoding, options, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand

Unix
Mac OS X
iOS
Windows
Processing
Options
Usage
MagickWand
MagickCore
PerlMagick
Magick++
Unix
Windows
Links

# ImageMagick WebP Image Format

ImageMagick's WebP image format accepts a plethora of encoding options as detailed below. As an example, suppose you are interested in these options:

- quality of 50
- lossless compression

Use this command:

$ convert wizard.png -quality 50 -define webp:lossless=true wizard.webp

Here is a complete list of WebP encoding options:

alpha-quality=value
  the compression value for alpha compression between 0 and 100. Lossless compression of alpha is achieved using a value of 100, while the lower values result in a lossy compression. The default is 100.
auto-filter=true, false
  when enabled, the algorithm spends additional time optimizing the filtering strength to reach a well-balanced quality.
filter-strength=value
  the strength of the deblocking filter, between 0 (no filtering) and 100 (maximum filtering). A value of 0 turns off any filtering. Higher values increase the strength of the filtering process applied after decoding the image. The higher the value, the smoother the image appears. Typical values are usually in the range of 20 to 50.
image-hint=photo, picture, graph
  the hint about the image type.
lossless=true, false
  encode the image without any loss.
method=value
  the compression method to use. It controls the trade off between encoding speed and the compressed file size and quality. Possible values range from 0 to 6. Default value is 4. When higher values are utilized, the encoder spends more time inspecting additional encoding possibilities and decide on the quality gain. Lower value might result in faster processing time at the expense of larger file size and lower compression quality.
pass=value
  maximum number of passes to target compression size or PSNR.
sns-strength=value
  the amplitude of the spatial noise shaping. Spatial noise shaping (SNS) refers to a general collection of built-in algorithms used to decide which area of the picture should use relatively less bits, and where else to better transfer these bits. The possible range goes from 0 (algorithm is off) to 100 (the maximal effect). The default value is 80.
target-size=value
  a target size (in bytes) to try and reach for the compressed output. The compressor makes several passes of partial encoding in order to get as close as possible to this target.

Discourse Server • Public Key • Studio • JqMagick