https://github.com/stemann/webp.jl
https://github.com/stemann/webp.jl
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/stemann/webp.jl
- Owner: stemann
- License: mit
- Created: 2024-04-10T18:03:56.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T19:05:31.000Z (about 2 years ago)
- Last Synced: 2024-04-10T21:55:08.045Z (about 2 years ago)
- Language: Julia
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebP
[](https://github.com/stemann/WebP.jl/actions/workflows/CI.yml?query=branch%3Amaster)
[](https://codecov.io/gh/stemann/WebP.jl)
[](https://github.com/invenia/BlueStyle)
WebP.jl is a Julia library for handling [WebP](https://developers.google.com/speed/webp) images. WebP provides both lossy and lossless compression of images, and may offer smaller file sizes compared to JPEG and PNG.
The core functionality of this package is supported by the [libwebp](https://developers.google.com/speed/webp/docs/api) C library.
## Usage
This package provides functions for reading and writing WebP image files,
* `WebP.read_webp`
* `WebP.write_webp`
as well as functions for decoding and encoding WebP image data,
* `WebP.decode`
* `WebP.encode`
### Reading and writing
An image may be written,
```julia
using TestImages
using WebP
image = testimage("lighthouse")
WebP.write_webp("lighthouse.webp", image)
```
and subsequently read,
```julia
image = WebP.read_webp("lighthouse.webp")
```
### Decoding and encoding
An image may be encoded,
```julia
using TestImages
using WebP
image = testimage("lighthouse")
data = WebP.encode(image) # data is a Vector{UInt8}
```
and subsequently decoded,
```julia
image = WebP.decode(data)
```