Questions tagged [webp]

WebP is an open standard for image encoding. It is intended to provide support for animation, metadata, lossless compression, and transparency without the patent or license restrictions of existing formats.

WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index. WebP supports lossless transparency (also known as alpha channel) with just 22% additional bytes. Transparency is also supported with lossy compression and typically provides 3x smaller file sizes compared to PNG when lossy compression is acceptable for the red/green/blue color channels.

754 questions
3
votes
1 answer

WebP lossless format overview

I am reading the official WebP lossless bitstream spec. and I have a feeling, that the document is missing some explanation. Let me describe some fragments of the specification: 1. Introduction - clear 2. Riff header - clear 3. Transformations…
Queequeg
  • 2,824
  • 8
  • 39
  • 66
2
votes
1 answer

How to save a numpy array to a webp file?

import numpy as np from PIL import Image I have a numpy array res: res = \ np.array([[[ 1, 142, 68], [ 1, 142, 74]], [[ 1, 142, 70], [ 1, 142, 77]], [[ 1, 142, 72], [ 1, 142, …
zabop
  • 6,750
  • 3
  • 39
  • 84
2
votes
2 answers

How can I convert photos to webp format in ASP.NET Core 7 on Windows Server?

I convert photos to webp format with asp.net core 7 on localhost, but the photos are not converted on windows server public static void GetWebp(int width, int height, int quality, string fullPath, string webpFile) { …
2
votes
1 answer

Decode Animated WebP using Javascript (React / NextJS)

I'm trying to decode animated WebP images. I'd like to extract the frames composing the animation as well as the delay for each frame. Any idea of how to deal with decoding animated WebP images using JavaScript in a React / NextJS environment? I've…
yondur
  • 41
  • 4
2
votes
1 answer

How to save 8bit (0-255) data table as an image file and then retrieve data from the image?

I am testing to see how I can save the data table in 8bits (0-255) into an image format to store raw data files and load the image to get retrieve the same data. Below code shows what I’m currently trying. With a 32x32 data table (random_data). I…
2
votes
1 answer

Why does ImageMagick fail with "no decode delegate for this image format `PNG'" even when the png delegate is installed?

I'm working on openSUSE Tumbleweed. I have ImageMagick installed. $ convert --version Version: ImageMagick 7.1.0-52 Q16-HDRI x86_64 20549 https://imagemagick.org Copyright: (C) 1999 ImageMagick Studio LLC License:…
2
votes
2 answers

Django convert image to webp

I have service in my Django project's app, that upload images, and I need to convert all images to webp to optimize further work with these files on the frontend side. Draft of _convert_to_webp method: # imports from pathlib import Path from…
Dmitriy Lunev
  • 177
  • 2
  • 12
2
votes
2 answers

Android : How to iterate through webp frames using android's ImageDecoder

I want to convert the animated webp into gif and I have gif encoder+decoder and webp ecnoder and it is working fine with gifs only. I want to process the animated webp as well so I need to decode the animated webp first and get bitamps for each…
CrackerKSR
  • 1,380
  • 1
  • 11
  • 29
2
votes
1 answer

Libvips PHP: How to make WEBP file with given compression?

I have code that converts and resize jpg to webp. One thing I can't solve: how to set compression. Code is like that: use Jcupitt\Vips; $vips = Vips\Image::newFromFile('src_file.jpg'); $thumb1 =…
Rolling
  • 53
  • 6
2
votes
0 answers

Dart: How to Encode Decode animated webp files?

I am trying to decode animated webp image file and encode it's frames to animated webp image file in Dart (cli) Dart Code: import 'dart:io'; import 'package:image/image.dart'; void main() { final image = 'asset/test.webp'; File bytes =…
CrackerKSR
  • 1,380
  • 1
  • 11
  • 29
2
votes
1 answer

image-minimizer-webpack-plugin generator keep originals

When i load an image in my webpack i want to optimize that image AND make a webp of that image. Im using image-minimizer-webpack-plugin with minimizer AND generator options, but it only generates the webp, the original version is deleted …
rodriciru
  • 141
  • 2
  • 9
2
votes
0 answers

Can I edit a WebP animation file to remove the auto loop?

I have a webp animation all setup but it is auto looping when it should top on the last frame (6s, 25fps). The tools I have used to create the webp do not let me configure the loop. Is there a way for me to edit the current webp file to remove the…
Andy
  • 21
  • 1
2
votes
2 answers

Is it possible to set quality in Image Intervention for WebP images?

I want to convert jpg to webp and set the quality to 50 (as an example). But the Image Intervention only supports the quality parameter only for jpg files. quality (optional) Define the quality of the encoded image optionally. Data ranging from 0…
kodfire
  • 1,612
  • 3
  • 18
  • 57
2
votes
2 answers

Dealing with Safari and .webp images in 2022

I've been waiting to use .webp images for a very long time. It's 2022, so, given: the image format has existed for a decade Chrome started supporting .webp in Jan 2014 Firefox started supporting .webp in Jan 2019 I decided the day before yesterday…
Rounin
  • 27,134
  • 9
  • 83
  • 108
2
votes
1 answer

How to convert animated webp to gif in android / java?

I want to convert the animated webp files to gif file and looking for solution since couple of days but did not get any easy straight solution yet. I tried ffmpeg but it could not do the job and after looking for solution I found that webp decoder…
UHS
  • 584
  • 4
  • 8