Заставка

Программирование на старых и современных языках, а так-же дизайн

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



Конвертирование из jpeg,png,gif в WebP

Сообщений 1 страница 3 из 3

1

1. Скачаем последнюю версию (13.01.2022) программы тут - https://storage.googleapis.com/download … ws-x64.zip

2. Распакуем куда-нибудь.

3. Запустим cwebp.exe:

Код:
C:\my\webp3\bin>cwebp.exe
Usage:

   cwebp [options] -q quality input.png -o output.webp

where quality is between 0 (poor) to 100 (very good).
Typical value is around 80.

Try -longhelp for an exhaustive list of advanced options.

4. Теперь дадим к примеру такую комманду:

Код:
cwebp.exe -q 100 mycursor_13_17_17_01_2023-min.jpg -o demo.webp

Вот результат:

Код:
C:\my\webp3\bin>cwebp.exe -q 100 mycursor_13_17_17_01_2023-min.jpg -o demo.webp
Saving file 'demo.webp'
File:      mycursor_13_17_17_01_2023-min.jpg
Dimension: 682 x 519
Output:    15008 bytes Y-U-V-All-PSNR 61.58 63.45 63.00   62.06 dB
           (0.34 bpp)
block count:  intra4:        160  (11.28%)
              intra16:      1259  (88.72%)
              skipped:      1107  (78.01%)
bytes used:  header:            392  (2.6%)
             mode-partition:   1305  (8.7%)
 Residuals bytes  |segment 1|segment 2|segment 3|segment 4|  total
    macroblocks:  |     100%|       0%|       0%|       0%|    1419
      quantizer:  |       0 |       0 |       0 |       0 |
   filter level:  |       0 |       0 |       0 |       0 |

0

2

Попробуем качество 80%:

Код:
C:\my\webp3\bin>cwebp.exe -q 80 mycursor_13_17_17_01_2023-min.jpg -o demo2.webp
Saving file 'demo2.webp'
File:      mycursor_13_17_17_01_2023-min.jpg
Dimension: 682 x 519
Output:    6698 bytes Y-U-V-All-PSNR 48.94 51.44 50.89   49.56 dB
           (0.15 bpp)
block count:  intra4:        131  (9.23%)
              intra16:      1288  (90.77%)
              skipped:      1092  (76.96%)
bytes used:  header:            228  (3.4%)
             mode-partition:   1309  (19.5%)
 Residuals bytes  |segment 1|segment 2|segment 3|segment 4|  total
    macroblocks:  |       0%|       4%|      20%|      75%|    1419
      quantizer:  |      27 |      25 |      22 |      18 |
   filter level:  |       8 |       5 |       5 |       2 |

0

3

Чтобы gif конвертировать в webp нужно использовать команду gif2webp.exe:

Код:
C:\my\webp3\bin>gif2webp.exe
Usage:
 gif2webp [options] gif_file -o webp_file
Options:
  -h / -help ............. this help
  -lossy ................. encode image using lossy compression
  -mixed ................. for each frame in the image, pick lossy
                           or lossless compression heuristically
  -q <float> ............. quality factor (0:small..100:big)
  -m <int> ............... compression method (0=fast, 6=slowest)
  -min_size .............. minimize output size (default:off)
                           lossless compression by default; can be
                           combined with -q, -m, -lossy or -mixed
                           options
  -kmin <int> ............ min distance between key frames
  -kmax <int> ............ max distance between key frames
  -f <int> ............... filter strength (0=off..100)
  -metadata <string> ..... comma separated list of metadata to
                           copy from the input to the output if present
                           Valid values: all, none, icc, xmp (default)
  -loop_compatibility .... use compatibility mode for Chrome
                           version prior to M62 (inclusive)
  -mt .................... use multi-threading if available

  -version ............... print version number and exit
  -v ..................... verbose
  -quiet ................. don't print anything

Пример:

Код:
C:\my\webp3\bin>gif2webp.exe Film1k.gif -o demo3.webp
Saved output file (3058 bytes): d

0