IMG2WEBP(1)

πŸ“¦
version 1.6.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– IMG2WEBP(1) β€” bestie edition πŸ’–

ok so this is a General Commands Manual page, section 1, for the command img2webp. yeah she's giving utility, she's giving converter, she's giving your faves are now one (1) animated file. sit down, grab a strawberry drink, we're doing this πŸ“


✨ NAME ✨

img2webp β€” create an animated WebP file from a sequence of input images. no cap, that's the whole job. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

img2webp [file_options] [[frame_options] frame_file]... [-o webp_file]
img2webp argument_file_name

🌸 DESCRIPTION 🌸

This manual page documents the img2webp command. hi yes hello, it's me, your documentation πŸ’…

img2webp compresses a sequence of images using the animated WebP format. literally just stacks your pics into one moving file, obsessed.

Input images can either be PNG, JPEG, TIFF or WebP. so basically the whole friend group is invited 🫢

If a single file name (not starting with the character -) is supplied as the argument, the command line arguments are actually tokenized from this file. so instead of typing a million things, you write them down once and let the file do the talking. This allows for easy scripting or using a large number of arguments. main character energy for real β€” the file carries the whole convo ✨


πŸŽ€ FILE-LEVEL OPTIONS πŸŽ€

The file-level options are applied at the beginning of the compression process, before the input frames are read. so they set the vibe before anyone walks in 🌈

  • -o string β€” Specify the name of the output WebP file. your lil baby's name, basically 🍼
  • -min_size β€” Encode images to achieve smallest size. This disables key frame insertion and picks the parameters resulting in the smallest output for each frame. It uses lossless compression by default, but can be combined with -q, -m, -lossy or -mixed options. skinny legend behavior, honestly.
  • -kmin int β€” Specify the minimum distance between consecutive key frames (independently decodable frames) in the output animation. The tool will insert some key frames into the output animation as needed so that this criteria is satisfied.
  • -kmax int β€” Specify the maximum distance between consecutive key frames (independently decodable frames) in the output animation. The tool will insert some key frames into the output animation as needed so that this criteria is satisfied.
ngl the -kmin / -kmax pair is one shared concept, bestie β€” min and max distance between key frames (the independently decodable ones, iykyk). the tool sprinkles in extra key frames as needed so your numbers get respected. 🧚
  • -mixed β€” Mixed compression mode: optimize compression of the image by picking either lossy or lossless compression for each frame heuristically. This global option disables the local option -lossy and -lossless. it's giving "why not both", but make it algorithmic 😌
  • -near_lossless int β€” Specify the level of near-lossless image preprocessing. This option adjusts pixel values to help compressibility, but has minimal impact on the visual quality. It triggers lossless compression mode automatically. The range is 0 (maximum preprocessing) to 100 (no preprocessing, the default). The typical value is around 60. Note that lossy with -q 100 can at times yield better results. she's subtle, she's strategic πŸ’œ
  • -sharp_yuv β€” Use more accurate and sharper RGB->YUV conversion. Note that this process is slower than the default 'fast' RGB->YUV conversion. prettier pixels, longer wait, we've all been there 😭
  • -loop int β€” Specifies the number of times the animation should loop. Using '0' means 'loop indefinitely'. infinite loop is a lifestyle fr fr πŸ”
  • -v β€” Be more verbose. she will not stop talking and we love her for it πŸ—£οΈ
  • -h, -help β€” A short usage summary. the tl;dr.
  • -version β€” Print the version numbers of the relevant libraries used. receipts, but for software πŸ“œ

πŸ¦‹ PER-FRAME OPTIONS πŸ¦‹

The per-frame options are applied for the images following as arguments in the command line. They can be modified any number of times preceding each particular input image. so like, you can change your mind between pics and that's completely valid πŸ’…

  • -d int β€” Specify the image duration in milliseconds. how long this frame stays on screen before the next one steps up ⏱️
  • -lossless, -lossy β€” Compress the next image(s) using lossless or lossy compression mode. The default mode is lossless. pick your fighter πŸ₯Š
  • -q float β€” Specify the compression factor between 0 and 100. The default is 75. quality dial, turn it up or down, no judgment.
  • -m int β€” Specify the compression method to use. This parameter 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 used, the encoder will spend more time inspecting additional encoding possibilities and decide on the quality gain. Lower value can result in faster processing time at the expense of larger file size and lower compression quality. highkey a whole personality test, pick accordingly 🌟
  • -exact, -noexact β€” Preserve or alter RGB values in transparent area. The default is -noexact, to help compressibility. Note -noexact may cause artifacts in frames compressed with -lossy.
⚠️ okay real talk bestie: -noexact is the default and it can cause artifacts in frames compressed with -lossy. it helps compressibility, but it's not free. if the vibes look cursed, that's why 😭

πŸ’€ EXIT STATUS πŸ’€

If there were no problems during execution, img2webp exits with the value of the C constant EXIT_SUCCESS. This is usually zero. clean run, flawless, no notes ✨

If an error occurs, img2webp exits with the value of the C constant EXIT_FAILURE. This is usually one. something went wrong and she's telling you loudly πŸ™ˆ


🌈 EXAMPLE 🌈

img2webp -loop 2 in0.png -lossy in1.jpg -d 80 in2.tiff -o out.webp

look at her go. looping twice, one lossy jpg, one 80ms tiff, all bundled into out.webp. ate and left no crumbs πŸ½οΈπŸ’–


πŸ‘‘ AUTHORS πŸ‘‘

img2webp is a part of libwebp and was written by the WebP team. The latest source tree is available at https://chromium.googlesource.com/webm/libwebp

This manual page was written by Pascal Massimino <pascal.massimino@gmail.com>, for the Debian project (and may be used by others). shoutout to Pascal, we stan a documentation icon 🫢


πŸ”₯ REPORTING BUGS πŸ”₯

Please report all bugs to the issue tracker: https://issues.webmproject.org Patches welcome! See this page to get started: https://www.webmproject.org/code/contribute/submitting-patches/

not me asking you to file an issue, but like... please file an issue πŸ’€


🌟 SEE ALSO 🌟

webpmux(1), gif2webp(1) Please refer to https://developers.google.com/speed/webp/ for additional information.


and that's the whole page, bestie. it's from the General Commands Manual, dated November 26, 2024 β€” IMG2WEBP(1), periodt πŸ’…πŸŽ€πŸ¦‹