All Projects β†’ chai2010 β†’ Webp

chai2010 / Webp

Licence: bsd-3-clause
WebP decoder and encoder for Go (Zero Dependencies).

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

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
Tiny Site
ε›Ύη‰‡δΌ˜εŒ–
Stars: ✭ 65 (-75.93%)
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
Pywebp
Python bindings for WebP
Stars: ✭ 35 (-87.04%)
Mutual labels:  webp, image
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+189.63%)
Mutual labels:  webp, image
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+525.93%)
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
FrameSequence
android java animate webp and gif support
Stars: ✭ 15 (-94.44%)
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
imei
IMEI - ImageMagick Easy Install
Stars: ✭ 126 (-53.33%)
Mutual labels:  webp
  • Go语言QQηΎ€: 102319854, 1055927514
  • 凹语言(ε‡Ήθ―»ιŸ³β€œWa”)(The Wa Programming Language): https://github.com/wa-lang/wa

webp

β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•
β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘
 β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• β•šβ•β•

Build Status GoDoc

Benchmark

Install

Install GCC or MinGW (download here) at first, and then run these commands:

  1. go get github.com/chai2010/webp
  2. 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].