All Projects → sejda-pdf → webp-imageio

sejda-pdf / webp-imageio

Licence: Apache-2.0 license
Java ImageIO WebP support

Programming Languages

java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects
Makefile
30231 projects

Projects that are alternatives of or similar to webp-imageio

Webp Wrapper
Wrapper for libwebp in C#. The most complete wapper in pure managed C#. Exposes Simple Decoding API, Simple Encoding API, Advanced Encoding API (with stadistis of compresion), Get version library and WebPGetFeatures (info of any WebP file). In the future I´ll update for expose Advanced Decoding API. The wapper are in safe managed code in one class. No need external dll except libwebp.dll (included). The wapper work in 32 and 64 bit system.
Stars: ✭ 107 (-20.74%)
Mutual labels:  webp
Imagepipeline
Folio Image Pipeline is an image loading and caching framework for iOS clients
Stars: ✭ 170 (+25.93%)
Mutual labels:  webp
Quick Picture Viewer
🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.
Stars: ✭ 237 (+75.56%)
Mutual labels:  webp
Optimus
Image conversion and optimization desktop app.
Stars: ✭ 111 (-17.78%)
Mutual labels:  webp
Metadata Extractor
Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Stars: ✭ 1,972 (+1360.74%)
Mutual labels:  webp
Gulp Webp
Convert images to WebP
Stars: ✭ 187 (+38.52%)
Mutual labels:  webp
Sdwebimagewebpcoder
A WebP coder plugin for SDWebImage, use libwebp
Stars: ✭ 101 (-25.19%)
Mutual labels:  webp
webp
Create a WebP copy for images (TYPO3 CMS)
Stars: ✭ 57 (-57.78%)
Mutual labels:  webp
Fastflix
FastFlix is a free GUI for HEVC and AV1 encoding, GIF/WebP creation, and more!
Stars: ✭ 154 (+14.07%)
Mutual labels:  webp
Apng4android
Android animation support for APNG & Animated WebP & Gif,High performance
Stars: ✭ 222 (+64.44%)
Mutual labels:  webp
Nim websitecreator
Nim fullstack website framework - deploy a website within minutes
Stars: ✭ 124 (-8.15%)
Mutual labels:  webp
Next Img
A Next.js plugin for embedding optimized images.
Stars: ✭ 149 (+10.37%)
Mutual labels:  webp
Twelvety
An Eleventy starter project built to be fast
Stars: ✭ 195 (+44.44%)
Mutual labels:  webp
Imagine
🖼️ PNG/JPEG optimization app for macOS, Windows and Linux.
Stars: ✭ 1,859 (+1277.04%)
Mutual labels:  webp
manael
Manael is a simple HTTP proxy for processing images.
Stars: ✭ 34 (-74.81%)
Mutual labels:  webp
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+932.59%)
Mutual labels:  webp
Webp Hero
browser polyfill for the webp image format
Stars: ✭ 171 (+26.67%)
Mutual labels:  webp
video thumbnail
This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
Stars: ✭ 159 (+17.78%)
Mutual labels:  webp
wasm-codecs
WebAssembly codecs for mozjpeg, oxipng, gifsicle and webp.
Stars: ✭ 48 (-64.44%)
Mutual labels:  webp
Imageprocessor
📷 A fluent wrapper around System.Drawing for the processing of image files.
Stars: ✭ 2,452 (+1716.3%)
Mutual labels:  webp

Travis build status

Forked repository

This is a fork from luciad/webp-imageio

Changes

  • Native libs are bundled in the jar
  • Published to Maven Central (org.sejda.imageio:webp-imageio artifact)
  • Android support unknown (have not tested)

Supported platforms

  • windows (32, 64 bit)
  • linux (64 bit)
  • mac (64 bit)

Description

Java Image I/O reader and writer for the Google WebP image format.

License

webp-imageio is distributed under the Apache Software License version 2.0.

Usage

  • Add Maven dependency org.sejda.imageio:webp-imageio to your application
  • The WebP reader and writer can be used like any other Image I/O reader and writer.

Decoding

WebP images can be decoded using default settings as follows.

BufferedImage image = ImageIO.read(new File("input.webp"));

To customize the WebP decoder settings you need to create instances of ImageReader and WebPReadParam.

// Obtain a WebP ImageReader instance
ImageReader reader = ImageIO.getImageReadersByMIMEType("image/webp").next();

// Configure decoding parameters
WebPReadParam readParam = new WebPReadParam();
readParam.setBypassFiltering(true);

// Configure the input on the ImageReader
reader.setInput(new FileImageInputStream(new File("input.webp")));

// Decode the image
BufferedImage image = reader.read(0, readParam);

Encoding

Encoding is done in a similar way to decoding.

You can either use the Image I/O convenience methods to encode using default settings.

// Obtain an image to encode from somewhere
BufferedImage image = ImageIO.read(new File("input.png"));

// Encode it as webp using default settings
ImageIO.write(image, "webp", new File("output.webp"));

Or you can create an instance of ImageWriter and WebPWriteParam to use custom settings.

// Obtain an image to encode from somewhere
BufferedImage image = ImageIO.read(new File("input.png"));

// Obtain a WebP ImageWriter instance
ImageWriter writer = ImageIO.getImageWritersByMIMEType("image/webp").next();

// Configure encoding parameters
WebPWriteParam writeParam = new WebPWriteParam(writer.getLocale());
writeParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
writeParam.setCompressionType(p.getCompressionTypes()[WebPWriteParam.LOSSLESS_COMPRESSION]);

// Configure the output on the ImageWriter
writer.setOutput(new FileImageOutputStream(new File("output.webp")));

// Encode
writer.write(null, new IIOImage(image, null, null), writeParam);

Compiling

Compiling the native library for Java SE

  • Install CMake 2.8 or newer. CMake can be downloaded from www.cmake.org or installed using your systems package manager.
  • Install VS 2017 Community and make sure the C++/Cmake dev tools modules are installed
  • Create a directory called build in the root of the project
  • Open a terminal and navigate to the newly created 'build' directory
  • Run cmake .. in the 'build' directory to generate the build scripts for your system. On Windows 64 bit run cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. to get a 64 bit dll.
  • cmake --build . --config Release to compile the library
  • The compiled library can be found under the directory build/src/main/c
  • Copy the compiled library to src/main/resources/native/$platform/$bits

Compiling the native library for Android

  • Install the Android NDK.
  • Run ndk-build in the src/android directory
  • After completion libwebp-imageio.so can be found under src/android/libs/<abi>

Compiling the Java library

Using Maven

  • Run mvn clean test in the root of the project
  • The compiled Java library can be found under the build directory
  • Run mvn release:prepare release:perform -Prelease -Darguments="-Dgpg.passphrase=secret123 -DstagingDescription=sambox" to upload to OSS Nexus, then login and publish to Maven Central
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].