summary refs log tree commit diff
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2019-07-11 22:20:45 +0200
committerHartmut Goebel <h.goebel@crazy-compilers.com>2019-07-13 20:04:44 +0200
commit6b61dea3365e8cbb6d5a918df5288489e27854e2 (patch)
tree35d7b610700d63c925c2d19545302c17ba8df752
parent8db1bd188b17c25f4bef8f3f4579df350a9b1e22 (diff)
downloadguix-6b61dea3365e8cbb6d5a918df5288489e27854e2.tar.gz
gnu: Add pngquant.
* gnu/packages/image.scm (pngquant): New variable.
-rw-r--r--gnu/packages/image.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index c4af4e0eb2..5d3aa03124 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -337,6 +337,50 @@ images.  This library can significantly reduces file sizes and powers pngquant
 and other PNG optimizers.")
    (license license:gpl3+)))
 
+(define-public pngquant
+  (package
+    (name "pngquant")
+    (version "2.12.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kornelski/pngquant.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1yiwbcihn4311fpfd568gg8zmmhqwg80jmhbhkb5msiipgd9xv33"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:configure-flags
+       '("--with-openmp" "--with-lcms2")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libpng" ,libpng)
+       ("zlib" , zlib)
+       ("lcms" ,lcms)
+       ("libimagequant" ,libimagequant)))
+    (home-page "https://pngquant.org/")
+    (synopsis "Utility and library for lossy compressing PNG images")
+    (description "pngquant is a PNG compressor that significantly reduces file
+sizes by converting images to a more efficient 8-bit PNG format with alpha
+channel (often 60-80% smaller than 24/32-bit PNG files).  Compressed images
+are fully standards-compliant and are supported by all web browsers and
+operating systems.
+
+Features:
+@enumerate
+@item High-quality palette generation using a combination of vector
+      quantization algorithms.
+@item Unique adaptive dithering algorithm that adds less noise to images
+      than the standard Floyd-Steinberg.
+@item Easy to integrate with shell scripts, GUIs and server-side software.
+@item Fast mode for real-time processing/large numbers of images.
+@end enumerate")
+    (license license:gpl3+)))
+
 (define-public libjpeg
   (package
    (name "libjpeg")