Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cwebp-bin

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cwebp-bin - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

8

index.js

@@ -24,9 +24,3 @@ 'use strict';

if (!exists) {
var args = [
path.join(__dirname, 'test/fixtures/test.png'),
'-o',
path.join(__dirname, 'test/fixtures/test.webp')
];
bin.run(args, function (error) {
bin.run('-version', function (error) {
if (error) {

@@ -33,0 +27,0 @@ console.log(chalk.red('✗ pre-build test failed, compiling from source...'));

5

package.json
{
"name": "cwebp-bin",
"version": "0.1.2",
"version": "0.1.3",
"description": "cwebp node.js wrapper that convert JPG or PNG into WebP",

@@ -43,4 +43,3 @@ "bin": {

"cli.js",
"index.js",
"test"
"index.js"
],

@@ -47,0 +46,0 @@ "keywords": [

@@ -8,16 +8,24 @@ # [node-cwebp-bin](https://www.npmjs.org/package/cwebp-bin)

## Dependency
## Examples
WebP requires following libraries. See [detail](https://developers.google.com/speed/webp/docs/compiling).
| ![](https://github.com/1000ch/node-cwebp-bin/raw/master/examples/png.png) | ![](https://github.com/1000ch/node-cwebp-bin/raw/master/examples/png.webp) |
|---|---|
| 8bit converted png (14,225 bytes) | WebP converted (14,924 bytes) |
### Linux
This case, 8-bit converted PNG image is smaller than WebP one,
Of course, WebP images are smaller than 24-bit PNG images.
But if PNG (event though 8-bit converted!) contains many colors, it depends.
```sh
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev
```
| ![](https://github.com/1000ch/node-cwebp-bin/raw/master/examples/jpg.jpg) | ![](https://github.com/1000ch/node-cwebp-bin/raw/master/examples/jpg.webp) |
|---|---|
| JPEGMini optimized jpg (39,335 bytes) | WebP converted (24,300 bytes) |
### Mac OS X
In most cases, WebP images are smaller than JPEG images.
## Dependencies on Linux
WebP requires following libraries on Linux. See [detail](https://developers.google.com/speed/webp/docs/compiling#compiling_on_unix-like_platforms).
```sh
$ sudo port install jpeg libpng tiff giflib
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev
```

@@ -24,0 +32,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc