vwebp
View WebP images
SYNOPSIS
vwebp [options] input_file.webp
PARAMETERS
-h
Prints a short help message and exits.
-version
Prints the version number of the libwebp library and exits.
-loop N
Loops the animation N times. Use 0 for infinite looping. Default is 0.
-fps F
Specifies the frames per second (FPS) for the animation. Default is 30.
-info
Prints image information (dimensions, frames, duration, etc.) and exits, without displaying the image.
-noalpha
Ignores the alpha channel (transparency) of the WebP image during display.
-nofullscreen
Prevents vwebp from attempting to use the full terminal window for display.
-min_duration D
Sets a minimum frame duration in milliseconds (ms) for all frames. If a frame has a shorter duration, it will be extended.
-use_color_profile
Attempts to use any ICC color profile embedded in the WebP image for rendering.
-no_color_profile
Explicitly ignores any ICC color profile embedded in the WebP image.
-verbose
Enables verbose output, showing more details about the decoding and rendering process.
-blend
Uses blend method for rendering. This is the default behavior.
-no_blend
Disables the blend method, instead drawing frames directly over the previous content.
-crop X Y W H
Crops the image to a rectangular region defined by top-left coordinates (X, Y) and dimensions (W, H).
-scale W H
Scales the image to the specified width W and height H pixels.
-premultiplication
Uses premultiplied alpha for blending. This is the default behavior.
-no_premultiplication
Disables premultiplied alpha for blending.
-dither strength
Applies dithering with a specified strength (0-100) to reduce color banding.
-no_screen_clear
Prevents vwebp from clearing the screen between frames, which might reduce flickering in some terminals.
-flip
Flips the image vertically before display.
-mt
Enables multi-threading for faster decoding and rendering, if supported by the system.
-k
When scaling, keeps the original aspect ratio of the image.
-cpu_cap_test
Runs an internal CPU capability test and prints the results.
-full_alpha
Uses the full 0-255 alpha range during blending, which can affect transparency rendering.
-h_frag
Enables horizontal fragment rendering optimization.
-v_frag
Enables vertical fragment rendering optimization.
DESCRIPTION
vwebp is a command-line utility from the libwebp package designed to display WebP images directly within a terminal window. It leverages the ncurses library to render both static and animated WebP files, providing a rudimentary graphical interface in a text-based environment. This tool is particularly useful for quickly previewing WebP images on headless servers, remote SSH sessions, or minimal systems where a full graphical desktop environment is unavailable or undesirable. It supports displaying animated WebP files, allowing users to control animation properties like loop count and frames per second. vwebp can also handle transparency, scale images to fit the terminal, and provide basic image information. While its display capabilities are limited by the terminal's character grid and color depth, it offers a surprisingly effective way to interact with WebP images without leaving the command line.
It's an invaluable diagnostic and preview tool for developers and system administrators working with WebP assets in non-GUI environments.
CAVEATS
The visual quality of images displayed by vwebp is highly dependent on the capabilities of the terminal emulator being used, including its character set, color support (e.g., 256 colors vs. true-color), and font rendering. True-color support can be limited or require specific terminal configurations. Displaying large images or high-FPS animations can be resource-intensive and may perform poorly, especially over slow network connections like SSH. Interactivity is basic, limited to pausing/resuming animation and frame navigation. Finally, vwebp requires the ncurses library for its rendering functionality, which might need to be explicitly installed on minimal Linux distributions.
KEY BINDINGS
While vwebp is running, users can interact with the displayed image or animation using the following keyboard shortcuts:
Space or n: Pause/Resume animation or advance to the next frame.
p: Go to the previous frame.
q: Quit the vwebp viewer.
HISTORY
vwebp is an integral part of the libwebp open-source project, primarily developed by Google. The libwebp library and its associated command-line tools, including vwebp, were created to promote the adoption and utility of the WebP image format, which offers superior compression compared to older formats like JPEG and PNG. vwebp specifically addresses the need for a command-line viewer, extending the format's usability into text-based and server environments, complementing the encoders (cwebp) and decoders (dwebp) within the suite. Its development has closely mirrored the improvements and feature additions to the WebP format itself, ensuring compatibility with new capabilities such as extended animation and ICC profiles.


