summaryrefslogtreecommitdiffstats
path: root/graphics/mozjpeg/README
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mozjpeg/README')
-rw-r--r--graphics/mozjpeg/README38
1 files changed, 34 insertions, 4 deletions
diff --git a/graphics/mozjpeg/README b/graphics/mozjpeg/README
index 24f5cd7e3f..7853d2ec80 100644
--- a/graphics/mozjpeg/README
+++ b/graphics/mozjpeg/README
@@ -1,6 +1,36 @@
-Improved JPEG encoder.
+mozjpeg (Mozilla JPEG Encoder Project)
-This will not interfere with Slackware's libjpeg,
-as it installs to /opt/.
+mozjpeg is a fork of libjpeg-turbo from Mozilla Research. Its goal is to
+reduce the size of JPEG files without reducing quality or compatibility
+with the vast majority of the world's deployed decoders. The idea is to
+reduce transfer times for JPEGs on the Web, thus reducing page load times.
-The binaries are in /opt/libmozjpeg/bin/.
+mozjpeg is not intended to be a general JPEG library replacement. It makes
+tradeoffs that are intended to benefit Web use cases and focuses solely
+on improving encoding. It is best used as part of a Web encoding workflow.
+
+In essence, libjpeg-turbo (as shipped with Slackware) is optimized for
+speed of encoding/decoding, while mozjpeg is optimized for encoding
+smaller file sizes (at the expense of speed). mozjpeg will not interfere
+with Slackware's libjpeg-turbo package, as it installs to /opt/mozjpeg/.
+
+mozjpeg supports multiple versions of the libjpeg API. By default,
+version 6b is built. If you need compatibility with libjpeg 7 or 8,
+set API=7 or API=8 in the script's environment.
+
+Optionally, mozjpeg can be built with Java wrapper support for
+turbojpeg. To do this, install one of: jdk, openjdk, openjdk8, or
+openjdk6. Then run this script with JAVA=yes in the environment.
+
+To run the binaries, it's probably easiest to add this to ~/.bash_profile:
+
+export PATH=/opt/mozjpeg/bin:$PATH
+export MANPATH=/opt/mozjpeg/man:$MANPATH
+
+To compile & link with the mozjpeg libraries, use -I/opt/mozjpeg/include
+and -L/opt/mozjpeg/lib (or lib64). You might also want -static, or else
+-Wl,-rpath,/opt/mozjpeg/lib (or lib64).
+
+If you built with JAVA=yes, the java library will be installed
+as /opt/mozjpeg/classes/turbojpeg.jar, and the docs will be in
+/usr/doc/mozjpeg-$VERSION/javadoc.