summaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm114
1 files changed, 101 insertions, 13 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 11cb63a895..89590cc5ad 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
@@ -24,11 +24,13 @@
(define-module (gnu packages image)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages doxygen)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages gl)
#:use-module (gnu packages maths)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@@ -163,6 +165,65 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+.
(license license:lgpl2.0+)))
+(define-public leptonica
+ (package
+ (name "leptonica")
+ (version "1.71")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.leptonica.com/source/leptonica-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0j5qgrff6im5n9waflbi7w643q1p6mahyf2z35gb4vj9h5p76pfc"))
+ (modules '((guix build utils)))
+ ;; zlib and openjpg should be under Libs, not Libs.private. See:
+ ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436
+ (snippet
+ '(substitute* "lept.pc.in"
+ (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post)
+ (string-append pre post))
+ (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post)
+ (string-append pre post))
+ (("^Libs: .*" all)
+ (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@"))))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("gnuplot" ,gnuplot))) ;needed for test suite
+ (inputs
+ `(("giflib" ,giflib)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)
+ ("libwebp" ,libwebp)))
+ (propagated-inputs
+ `(("openjpeg" ,openjpeg)
+ ("zlib" ,zlib)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ ;; Prevent make from trying to regenerate config.h.in.
+ (add-after
+ 'unpack 'set-config-h-in-file-time
+ (lambda _
+ (set-file-time "config/config.h.in" (stat "configure"))))
+ (add-after
+ 'unpack 'patch-reg-wrapper
+ (lambda _
+ (substitute* "prog/reg_wrapper.sh"
+ ((" /bin/sh ")
+ (string-append " " (which "sh") " "))))))))
+ (home-page "http://www.leptonica.com/")
+ (synopsis "Library and tools for image processing and analysis")
+ (description
+ "Leptonica is a C library and set of command-line tools for efficient
+image processing and image analysis operations. It supports rasterop, affine
+transformations, binary and grayscale morphology, rank order, and convolution,
+seedfill and connected components, image transformations combining changes in
+scale and pixel depth, and pixelwise masking, blending, enhancement, and
+arithmetic ops.")
+ (license license:bsd-2)))
+
(define-public jbig2dec
(package
(name "jbig2dec")
@@ -323,25 +384,16 @@ compose, and analyze GIF images.")
(define-public imlib2
(package
(name "imlib2")
- (version "1.4.6")
+ (version "1.4.7")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/enlightenment/imlib2-"
- version ".tar.gz"))
+ version ".tar.bz2"))
(sha256
(base32
- "0kjggg4gfn6chi8v1xddd5qwk1fbnl7rvd93qiclv5v11s615k0p"))))
+ "00a7jbwj10x3jcvxa5rplnkvhv35gv9rb400zy636zdd4g737mrm"))))
(build-system gnu-build-system)
- (arguments
- '(;; Will be fixed in the next release:
- ;; <http://git.enlightenment.org/legacy/imlib2.git/commit/?id=5dde234b2d3caf067ea827858c53adc5d4c56c13>.
- #:phases (alist-cons-before
- 'configure 'patch-config
- (lambda _
- (substitute* "imlib2-config.in"
- (("@my_libs@") "")))
- %standard-phases)))
(native-inputs
`(("pkgconfig" ,pkg-config)))
(inputs
@@ -475,3 +527,39 @@ algorithms and data structures. It is particularly strong for
multi-dimensional image processing.")
(license license:expat)
(home-page "https://hci.iwr.uni-heidelberg.de/vigra")))
+
+(define-public libwebp
+ (package
+ (name "libwebp")
+ (version "0.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://downloads.webmproject.org/releases/webp/libwebp-" version
+ ".tar.gz"))
+ (sha256
+ (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("freeglut" ,freeglut)
+ ("giflib" ,giflib)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)))
+ (arguments
+ '(#:configure-flags '("--enable-libwebpmux"
+ "--enable-libwebpdemux"
+ "--enable-libwebpdecoder")))
+ (home-page "https://developers.google.com/speed/webp/")
+ (synopsis "Lossless and lossy image compression")
+ (description
+ "WebP is a new image format that provides lossless and lossy compression
+for images. WebP lossless images are 26% smaller in size compared to
+PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
+equivalent SSIM index. WebP supports lossless transparency (also known as
+alpha channel) with just 22% additional bytes. Transparency is also supported
+with lossy compression and typically provides 3x smaller file sizes compared
+to PNG when lossy compression is acceptable for the red/green/blue color
+channels.")
+ (license license:bsd-3)))