java调用mozjpeg,README.md · mirrors_miluxhd/mozjpeg4j - Gitee.com

MozJpeg4J

This project is based on Mozilla JPEG Encoder (MozJpeg). The original project

is written in C and provides a Java wrapper with the expectation to find a compiled library in the system.

MozJpeg4J simplifies its use in Java by including a set of pre-compiled libraries for Windows, Linux, and Mac.

It also extends the Java wrapper by loading the native OS library and providing utilities for image compression.

Currently default version 3.1 of MozJpeg is embedded into the project.

To build the library or run demo applications, you will need to install Git and

Gradle in your system. Once frameworks are installed, run the following command to clone

the project:

git clone https://github.com/dviktorov/mozjpeg4j.git

Building Java library

To build Java library, run the following command from the cloned project folder:

gradle clean test jar

After the process is finished, the library jar file can be found at ./build/libs of the project

Building OSGi Java library

To build OSGi Java library, run the following command from the cloned project folder:

gradle clean test jarOSGI

After the process is finished, the OSGi library jar file can be found at ./build/libs of the project

Running compression demo gallery

To evaluate the quality of the library you may run the command below. It will compress a set of images and generate

an HTML report at ./build/reports/jpeg_compression. You may open index.html in a browser to view the gallery.

gradle clean test runJpegCompressionDemoApp

Running MozJpeg command line utility

To run the utility that is presented at Mozilla JPEG Encoder (MozJpeg) you may

run the command below. You may refer to the printed "usage" message to understand how to use the utility and the

options it recognizes.

gradle clean test runMozJpeg

License

The license is fully inherited from Mozilla JPEG Encoder (MozJpeg). Please

refer to LICENSE.txt to retrieve it.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值