- How to Convert Images to WebP Format in Linux
- How to Install WebP Tool in Linux
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- How to Use WebP Images in Ubuntu and Other Linux Distributions
- What is WebP?
- Add WebP support to GNOME Image Viewer in Ubuntu and Other Linux
- Use gThumb to view WebP images in Ubuntu and other Linux
- Make gThumb the default application for WebP images in Ubuntu
- Convert WebP images to PNG and JPEG in Linux
- 1. Using command line to convert WebP images in Linux
- Convert JPEG/PNG to WebP
- Convert WebP to JPEG/PNG
- 2. Using GUI tool to convert WebP to JPEG/PNG
- What’s your pick?
- WEBP чем открыть на компьютере и как конвертировать такие файлы в другие форматы
- Чем открыть webp в linux. Добавляем поддержку Webp
- Программы с графическим интерфейсом для работы с WebP в linux
- Конвертировать JPEG / PNG в WebP
- Конвертировать WebP в JPG / PNG
- WebP чем открыть в Windows
- Как конвертировать WebP в другой формат в Windows
How to Convert Images to WebP Format in Linux
One of the numerous best practices you will hear of, for optimizing your web-site performance is using compressed images. In this article, we will share with you a new image format called webp for creating compressed and quality images for the web.
WebP is a relatively new, open source image format that offers exceptional lossless and lossy compression for images on the web, designed by Google. To use it, you need to download pre-compiled utilities for Linux, Windows and Mac OS X.
With this modern image format, webmasters and web developers can create smaller, richer images that make the web faster.
How to Install WebP Tool in Linux
Thankfully, the webp package is present in the Ubuntu official repositories, you can install it using the APT package manager as shown.
On other Linux distributions, start by downloading the webp package from Googles repository using the wget command as follows.
Now extract the archive file and move into the extracted package directory as follows.
Webp Packages
As you can see from the above screen shot, the package contains a precompiled library (libwebp) for adding webp encoding or decoding to your programs and various webp utilities listed below.
- anim_diff – tool to display the difference between animation images.
- anim_dump – tool to dump the difference between animation images.
- cwebp – webp encoder tool.
- dwebp – webp decoder tool.
- gif2webp – tool for converting GIF images to webp.
- img2webp – tools for converting a sequence of images into an animated webp file.
- vwebp – webp file viewer.
- webpinfo – used to view info about a webp image file.
- webpmux – webp muxing tool.
To convert an image to webp, you can use the cwebp tool, where the -q switch defines the output quality and -o specifies the output file.
Covert Image to WebP Format
You can view the converted webp image using the vwebp tool.
View WebP Format Image
You can see all options for any of the tools above by running them without any arguments or using the -longhelp flag, for example.
Last but not least, if you want to run the above programs without typing their absolute paths, add the directory
/libwebp-0.6.1-linux-x86-32/bin to your PATH environmental variable in your
Add the line below towards the end of the file.
Save the file and exit. Then open a new terminal window and you should be able to run all webp programs like any other system commands.
Also check out these useful related articles:
WebP is just one of the many products coming out of Google’s continuous efforts towards making the web faster. Remember to share you thoughts concerning this new image format for the web, via the feedback form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
How to Use WebP Images in Ubuntu and Other Linux Distributions
Last updated September 23, 2021 By Abhishek Prakash 26 Comments
Brief: This guide shows you how to view WebP images in Linux and how to convert WebP images to JPEG or PNG format.
What is WebP?
It’s been over ten years since Google introduced WebP file format for images. WebP provides lossy and lossless compression and WebP compressed files are around 25% smaller in size when compared to JPEG compression, Google claims.
Slowly and gradually, WebP is gaining popularity. CDNs automatically convert PNG files to WebP to server images in smaller sizes. This is why when you download images from websites, theyare downloaded in .wep format.
The problem is that GNOME Image Viewer, the default image viewer on mayn distributions does not support this format.
If you try to open a webp image, it opens the WebP image in a web browser. If you try top open with photo viewer, it throws an error:
Could not load image XYZ.webp
Unrecognized image file format
There are ways to get rid of this annoyance. In this tutorial, you’ll see:
- How to add WebP support to GNOME’s Image Viewer (recommended)
- How to use other tools for opening WebP files
- How to convert WebP images to PNG or JPEG
Let’s go through them one by one.
Add WebP support to GNOME Image Viewer in Ubuntu and Other Linux
By default, the photo viewer does not support WebP images files. However, you can add WebP support by installing webp-pixbuf-loader library. Not only it allows you to open WebP files in GNOME Image Viewer, it also displays thumbnails for WebP files in the file explorer.
On Ubuntu-based Linux distributions, you can install this library using a PPA. Use the following commands one by one:
In other distributions like Fedora and SUSE, you should be able to use the package manager and install it from the distribution’s repositories.
On Arch Linux, use:
Once it is installed, you don’t have to do anything else. No need to restart or log out. You’ll see that the WebP images are now displayed with thumbnails:
You should also change the default application in Ubuntu to open it with Image viewer with double click:
This is what I recommend but if for some reasons, you cannot install this additional library, you can use another application.
Use gThumb to view WebP images in Ubuntu and other Linux
One of the alternative photo viewer application is gThumb and it supports WebP images by default.
To install gThumb in Ubuntu and other Ubuntu based Linux distributions, use the command below:
Once installed, you can simply rightly click on the WebP image and select gThumb to open it. You should be able to see it now:
Make gThumb the default application for WebP images in Ubuntu
For Ubuntu beginners, if you like to make gThumb the default application for opening WebP files, just follow the steps below:
Step 1: Right click on the WebP image and select Properties.
Step 2: Go to Open With tab, select gThumb and click on Set as default.
Convert WebP images to PNG and JPEG in Linux
Since you are dealing with WebP images, you may want to learn about converting WebP to regular images.
There are two ways to convert WebP images in Linux:
1. Using command line to convert WebP images in Linux
You need to install WebP tools first. Open a terminal and use the following command:
Convert JPEG/PNG to WebP
We’ll use cwebp command (does it mean compress to WebP?) to convert JPEG or PNG files to WebP. The command format is like:
cwebp -q [image_quality] [JPEG/PNG_filename] -o [WebP_filename]
For example, you can use the following command:
Convert WebP to JPEG/PNG
To convert WebP images to JPEG or PNG, we’ll use dwebp command. The command format is:
dwebp [WebP_filename] -o [PNG_filename]
An example of this command could be:
2. Using GUI tool to convert WebP to JPEG/PNG
For this purpose, we will use XnConvert which is a free but not open source application. You can download the installer files from their website:
Note that XnConvert is a powerful tool that you can use for batch resizing images. However, in this tutorial, we shall only see how to convert a single WebP image to PNG/JPEG.
Open XnConvert and select the input file:
In the Output tab, select the output format you want it to be converted. Once you have selected the output format, click on Convert.
That’s all you need to do to convert WebP images to PNG, JPEg or any other image format of your choice.
What’s your pick?
I hope this detailed tutorial helped you to get WebP support on Linux and helped you to convert WebP images. How do you handle WebP images in Linux? Which tool do you use? From the above described methods, which one did you like the most?
Like what you read? Please share it with others.
Источник
WEBP чем открыть на компьютере и как конвертировать такие файлы в другие форматы
WEBP чем открыть. Формат Webp все чаще встречается при работе с графическими изображениями. И возникает вопрос как работать с картинками. Согласно Википедии , WebP — формат сжатия изображений с потерями и без потерь качества, предложенный компанией Google Inc. в 2010 году. В этой статье я расскажу как работать с этим форматом.
Чем открыть webp в linux. Добавляем поддержку Webp
- Как добавить поддержку WebP в Linux
- Программы, поддерживающие работу с изображениями WebP в Linux и Windows
- Как конвертировать изображения WebP в JPG, JPEG, PNG и другие форматы
Для работы с форматом webp в линукс нужно установить пакет командой:
Теперь можно использую терминал конвертировать изображения в нужный нам формат.
Программы с графическим интерфейсом для работы с WebP в linux
На мой взгляд самыми удобными для для открытия файлов webp это gThumb (для рабочей среды gnome и всех сделанных на её основе) и Gwenview (штатный обозреватель фото для KDE). Пользуюсь обеими первая хороша как быстрый и удобный просмотровщик фотографий с помощью второй можно еще делать небольшое редактирование.
Если вы не используете KDE учтите, что будут загружены и установлены пакеты этой среды рабочего окружения. Для установки Gwenview выполните команду:
Для полной русификации программ KDE установите поддержку Русского языка. Команда:
Для установки gThumb выполните команду:
После установки можно свободно открывать, просматривать и сохранять картинки в нужном вам формате. gThumb я сделал программой по умолчанию работающей с форматом webp. В XFCE это сделать очень просто. Кликните по файлу правой кнопки мыши и в контекстном меню выберите «Открыть в другом приложении» (Открыть с помощью)
Выберите левым кликом мыши по нужному приложению, в данном случае gThumb, и поставьте флаг в чекбоксе «Использовать по умолчанию для этого типа файлов». После чего нажмите кнопку открыть.
Теперь при открытии файлов данного типа будет использована эта программа.
Конвертировать JPEG / PNG в WebP
Для преобразования файлов JPEG или PNG в WebP нужно использовать программу «cwebp» для сжатия. Пример команды:
cwebp -q [качество_картинки] [JPEG / _имя_файла_PNG] -o [_имя_файла_WebP]
Пример изменения файла:
После применения команды, файл example.jpeg будет преобразован в example.webp.
Конвертировать WebP в JPG / PNG
Думаю более интересно обратное изменение файлов в более привычные для нас форматы. Теперь изменим webp на jpg или png. Для этого применим программу «dwebp». Пример команды:
dwebp [_имя_файла_WebP] -o [_имя_файла_PNG]
Пример для конвертирования:
В результате получим файл example.png в привычном формате .png. Если нужно в jpeg/jpg то вместо .png пишем .jpeg или .jpg.
Для пакетной конвертации также прекрасно подойдет кроссплатформенная программа «Converseen» речь о ней будет в конце статьи. А подробный обзор находится здесь. Для установки используйте команду:
WebP чем открыть в Windows
С линуксом разобрались. Теперь давайте разберемся, как просматривать и конвертировать файлы с разрешением .webp. Здесь тоже все довольно просто. Есть две хорошие программы просмотровщики и конвертер содержащий webp codec для windows.
Первая программа это XnView. Скачать XnView с официально сайта . Поддерживает данный формат сразу после установки. Можно смотреть и преобразовывать.
Вторая программа вьювер мне нравиться больше. Это IrfanView. Скачать IrfanView c официального сайта .
Для того, что бы она могла работать с расширением .webp потребуется скачать и установить плагины. На официальном сайте они есть для 32 и 64 битных систем. Можно скачать как установщик так и архив. В случае с архивом распакуйте в папку с программой для плагинов «Plugins». Для примера 32 битная версия в Windows 7 64 путь такой:
Скачиваете, устанавливаете и пользуетесь.
Как конвертировать WebP в другой формат в Windows
Как изменить формат WebP на JPEG, PNG и другие в Windows? Если фалов достаточно много то удобнее использовать для этого специальную программу конвертер.
Одна из самых удобных и бесплатных это «Converseen». Скачать программу Converseen с официального сайта . Разработчики сразу предлагают и переносимую версию ( portable ).
Подробный обзор программы Converseen читайте на этой странице.
На этом все. Думаю, что с форматом WebP разобрались как работать.
Источник