png批量转换为webp_将JPG,PNG和动画GIF转换为WEBP

png批量转换为webp

New image formats like WEP and MOZJPEG will be a major boost to load time on the web.  The majority of page load and render time is usually attributed to unoptimized images, so these new formats will make both mobile and desktop load times faster.  I've taught you how to detect WEBP support but we've not explored how to create WEBP images; let's have a look at how easy it is to convert JPG, PNG, and even animated GIF to WEBP.

诸如WEP和MOZJPEG之类的新图像格式将极大地增加Web上的加载时间。 大多数页面加载和渲染时间通常归因于未优化的图像,因此这些新格式将使移动和桌面加载时间更快。 我已经教过您如何检测WEBP的支持,但是我们还没有探讨如何创建WEBP图像。 让我们看一下将JPG,PNG甚至动画GIF转换为WEBP有多么容易。

将JPG和PNG转换为WEBP (Convert JPG and PNG to WEBP)

My favorite open source image manipulation library, ImageMagick, doesn't have the capability to convert images to WEBP out of the box -- you'll receive an ugly error if you don't first install webp via a utility like homebrew:

我最喜欢的开源图像处理库ImageMagick没有开箱即用将图像转换为WEBP的功能-如果您不首先通过类似homebrew的实用工具安装webp,则会收到一个难看的错误消息:

brew install webp

Once webp is available, you can use ImageMagick to do the conversion:

一旦webp可用,您可以使用ImageMagick进行转换:

convert logo.png logo.webp

In most cases the WEBP image, which is only available in Chrome at the time of publishing, will be significantly smaller than the original image.

在大多数情况下,仅在发布时在Chrome中可用的WEBP图像会比原始图像小得多。

将动画GIF转换为WEBP (Convert Animated GIF to WEBP)

The webp library doesn't have the capability to convert animated GIF images to WEBP.  You'll need to download gif2webp from Google.  With gif2webp available, you can convert your animated GIF image to WEBP:

webp库不具备将GIF动画图像转换为WEBP的功能。 您需要从Google下载gif2webp 。 使用gif2webp,您可以将GIF动画图像转换为WEBP:

gif2webp animation.gif -o animation.webp

gif2webp provides numerous options for output modification like quality, multi-threading encoding, etc.

gif2webp提供了许多用于输出修改的选项 ,例如质量,多线程编码等。

Imagine the boost in your site load time if you created and served WEBP images where they're supported.  Faster sites means more conversions and better user experience.  Make it happen!

想象一下,如果在受支持的地方创建并提供了WEBP图像,则会增加站点加载时间。 更快的网站意味着更多的转化和更好的用户体验。 实现它!

翻译自: https://davidwalsh.name/convert-webp

png批量转换为webp

你可能感兴趣的:(人工智能,java,大数据,javascript,python,ViewUI)