chai2010 / Webp
Licence: bsd-3-clause
WebP decoder and encoder for Go (Zero Dependencies).
Stars: β 270
Projects that are alternatives of or similar to Webp
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: β 4,107 (+1421.11%)
Mutual labels: webp, image
Nuxt Optimized Images
π
π Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).
Stars: β 717 (+165.56%)
Mutual labels: webp, image
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: β 21,131 (+7726.3%)
Mutual labels: webp, image
Vulcan
Multi image downloader with priority in Swift
Stars: β 291 (+7.78%)
Mutual labels: webp, image
Pinremoteimage
A thread safe, performant, feature rich image fetcher
Stars: β 3,929 (+1355.19%)
Mutual labels: webp, image
Sdwebimage
Asynchronous image downloader with cache support as a UIImageView category
Stars: β 23,928 (+8762.22%)
Mutual labels: webp, image
Flyimg
Dockerized PHP7 application runs as a Microservice to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick. Includes face detection, cropping, face blurring, image rotation and many other options. Abstract storage based on FlySystem in order to store images on any provider (local, AWS S3...).
Stars: β 762 (+182.22%)
Mutual labels: webp, image
Pixterm
Draw images in your ANSI terminal with true color
Stars: β 782 (+189.63%)
Mutual labels: webp, image
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: β 1,394 (+416.3%)
Mutual labels: webp, image
Quick Picture Viewer
πΌοΈ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.
Stars: β 237 (-12.22%)
Mutual labels: webp, image
image-processing-pipeline
An image build orchestrator for the modern web
Stars: β 43 (-84.07%)
Mutual labels: webp
Tableexport
tableExportοΌtableε―ΌεΊζδ»ΆοΌζ―ζjsonγcsvγtxtγxmlγwordγexcelγimageγpdfοΌ
Stars: β 261 (-3.33%)
Mutual labels: image
webp server node
Node version of WebP Server. A tool that will serve your JPG/PNGs as WebP format with compression, on-the-fly,
Stars: β 19 (-92.96%)
Mutual labels: webp
Landscapist
π Jetpack Compose image loading library which can fetch and display network images using Glide, Coil, and Fresco.
Stars: β 264 (-2.22%)
Mutual labels: image
Pyinstastories
Python script to download Instagram stories from Instagram users.
Stars: β 260 (-3.7%)
Mutual labels: image
- Goθ―θ¨QQηΎ€: 102319854, 1055927514
- εΉθ―θ¨(εΉθ―»ι³βWaβ)(The Wa Programming Language): https://github.com/wa-lang/wa
webp
βββ ββββββββββββββββββ βββββββ
βββ βββββββββββββββββββββββββββ
βββ ββ βββββββββ ββββββββββββββββ
ββββββββββββββββ βββββββββββββββ
βββββββββββββββββββββββββββββ
ββββββββ βββββββββββββββ βββ
Benchmark
Install
Install GCC
or MinGW
(download here) at first,
and then run these commands:
go get github.com/chai2010/webp
go run hello.go
Example
This is a simple example:
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"github.com/chai2010/webp"
)
func main() {
var buf bytes.Buffer
var width, height int
var data []byte
var err error
// Load file data
if data, err = ioutil.ReadFile("./testdata/1_webp_ll.webp"); err != nil {
log.Println(err)
}
// GetInfo
if width, height, _, err = webp.GetInfo(data); err != nil {
log.Println(err)
}
fmt.Printf("width = %d, height = %d\n", width, height)
// GetMetadata
if metadata, err := webp.GetMetadata(data, "ICCP"); err != nil {
fmt.Printf("Metadata: err = %v\n", err)
} else {
fmt.Printf("Metadata: %s\n", string(metadata))
}
// Decode webp
m, err := webp.Decode(bytes.NewReader(data))
if err != nil {
log.Println(err)
}
// Encode lossless webp
if err = webp.Encode(&buf, m, &webp.Options{Lossless: true}); err != nil {
log.Println(err)
}
if err = ioutil.WriteFile("output.webp", buf.Bytes(), 0666); err != nil {
log.Println(err)
}
fmt.Println("Save output.webp ok")
}
Decode and Encode as RGB format:
m, err := webp.DecodeRGB(data)
if err != nil {
log.Fatal(err)
}
data, err := webp.EncodeRGB(m)
if err != nil {
log.Fatal(err)
}
Notes
Change the libwebp to fast method:
internal/libwebp/src/enc/config.c
WebPConfigInitInternal
config->method = 0; // 4;
BUGS
Report bugs to [email protected].
Thanks!
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].