Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeroen/webp
R bindings for libwebp
https://github.com/jeroen/webp
Last synced: 9 days ago
JSON representation
R bindings for libwebp
- Host: GitHub
- URL: https://github.com/jeroen/webp
- Owner: jeroen
- License: other
- Created: 2015-12-26T20:58:01.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T18:17:51.000Z (about 1 month ago)
- Last Synced: 2024-10-11T18:19:49.504Z (25 days ago)
- Language: R
- Homepage:
- Size: 47.9 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - jeroen/webp - R bindings for libwebp (R)
README
# webp
> A New Format for Lossless and Lossy Image Compression
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/jeroen/webp?branch=master&svg=true)](https://ci.appveyor.com/project/jeroen/webp)
[![Coverage Status](https://codecov.io/github/jeroen/webp/coverage.svg?branch=master)](https://codecov.io/github/jeroen/webp?branch=master)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/webp)](https://cran.r-project.org/package=webp)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/webp)](https://cran.r-project.org/package=webp)Lossless webp images are 26% smaller in size compared to PNG. Lossy
webp images are 25-34% smaller in size compared to JPEG. This package reads
and writes webp images into a 3 (rgb) or 4 (rgba) channel bitmap array using
conventions from the 'jpeg' and 'png' packages.## Hello World
```r
# Convert to webp
library(png)
img <- readPNG(system.file("img", "Rlogo.png", package="png"))
write_webp(img, "rlogo.webp")
browseURL("rlogo.webp")
rm(img)# Convert from webp
library(jpeg)
img <- read_webp("rlogo.webp")
writeJPEG(img, "rlogo.jpeg")
browseURL("rlogo.jpeg")
```## Installation
Binary packages for __OS-X__ or __Windows__ can be installed directly from CRAN:
```r
install.packages("webp")
```Installation from source on Linux or OSX requires [`libwebp`](https://developers.google.com/speed/webp/). On __Debian__ or __Ubuntu__ install [libwebp-dev](https://packages.debian.org/testing/libwebp-dev):
```
sudo apt-get install -y libwebp-dev
```On __Fedora__ we need [libwebp-devel](https://src.fedoraproject.org/rpms/libwebp):
```
sudo yum install libwebp-devel
````On __CentOS / RHEL__ we install [libwebp-devel](https://src.fedoraproject.org/rpms/libwebp) via EPEL:
```
sudo yum install epel-release
sudo yum install libwebp-devel
```On __OS-X__ use [webp](https://github.com/Homebrew/homebrew-core/blob/master/Formula/webp.rb) from Homebrew:
```
brew install webp
```