aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-07-17 15:51:10 +0200
committerLudovic Courtès <ludo@gnu.org>2019-07-17 15:51:10 +0200
commit64de896a71a9ba3091259834077d54c0146bdab6 (patch)
treeda58cc584fcc42a2b04f692aa3b1ada4c8949f5e /gnu/packages/image.scm
parent5247aab8d6a18a4081ab7caeddb4fc083bca1f6b (diff)
parent6bfcb729268e0d20c6ae78224aef0eaad2ee2e74 (diff)
downloadpatches-64de896a71a9ba3091259834077d54c0146bdab6.tar
patches-64de896a71a9ba3091259834077d54c0146bdab6.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm70
1 files changed, 69 insertions, 1 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 262bcd31dc..27062ac777 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -14,7 +14,7 @@
;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 ng0 <ng0@n0.is>
-;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2017,2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
@@ -295,6 +295,74 @@ files. It can compress them as much as 40% losslessly.")
Currently all documentation resides in @file{pnglite.h}.")
(license license:zlib))))
+(define-public libimagequant
+ (package
+ (name "libimagequant")
+ (version "2.12.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ImageOptim/libimagequant.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0qsfq1kv1m5jzn9v9iz0bac66k4clcis1c9877qabnwzwmwma5v0"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f)) ; no check target
+ (home-page "https://pngquant.org/lib/")
+ (synopsis "Image palette quantization library")
+ (description "libimagequant is a small, portable C library for
+high-quality conversion of RGBA images to 8-bit indexed-color (palette)
+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")