1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
5 ;;; Copyright © 2014, 2016 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
8 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
9 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages image)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages algebra)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages boost)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages documentation)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages ghostscript)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages graphics)
41 #:use-module (gnu packages maths)
42 #:use-module (gnu packages mcrypt)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages xml)
47 #:use-module (gnu packages xorg)
48 #:use-module (gnu packages zip)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix build-system gnu)
53 #:use-module (guix build-system cmake)
54 #:use-module (srfi srfi-1))
63 ;; Note: upstream removes older tarballs.
64 (uri (list (string-append "mirror://sourceforge/libpng/libpng15/"
65 version "/libpng-" version ".tar.xz")
67 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
68 "/libpng15/libpng-" version ".tar.xz")))
70 (base32 "0kbissyd7d4ahwdpm968nnzl7q15p6hadg44i9x0vrkrzdgdi93v"))))
71 (build-system gnu-build-system)
73 ;; libpng.la says "-lz", so propagate it.
74 (propagated-inputs `(("zlib" ,zlib)))
76 (synopsis "Library for handling PNG files")
78 "Libpng is the official PNG (Portable Network Graphics) reference
79 library. It supports almost all PNG features and is extensible.")
80 (license license:zlib)
81 (home-page "http://www.libpng.org/pub/png/libpng.html")))
83 (define-public libpng-1.2
90 ;; Note: upstream removes older tarballs.
91 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
92 version "/libpng-" version ".tar.xz")
94 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
95 "/libpng12/libpng-" version ".tar.xz")))
97 (base32 "1ghd03p353x0vi4dk83n1nlldg11w7vqdk3f99rkgfb82ic59ki4"))))))
99 (define-public libjpeg
105 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
108 "19q5zr4n60sjcvfbyv06n4pcl1mai3ipvnd2akflayciinj3wx9s"))))
109 (build-system gnu-build-system)
110 (synopsis "Library for handling JPEG files")
112 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
113 JPEG is a standardized compression method for full-color and gray-scale
115 The included programs provide conversion between the JPEG format and
116 image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.")
117 (license license:ijg)
118 (home-page "http://www.ijg.org/")))
120 (define-public libjpeg-8
121 (package (inherit libjpeg)
125 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
128 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
130 (define-public jpegoptim
136 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
139 "0k53q7dc8w5ashz8v261x2b5vvz7gdvg8w962rz9gjvkjbh4lg93"))))
140 (build-system gnu-build-system)
141 (inputs `(("libjpeg" ,libjpeg)))
145 (synopsis "Optimize JPEG images")
147 "jpegoptim provides lossless optimization (based on optimizing
148 the Huffman tables) and \"lossy\" optimization based on setting
149 maximum quality factor.")
150 (license license:gpl2+)
151 (home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim")))
153 (define-public libicns
160 "mirror://sourceforge/icns/"
161 "libicns-" version ".tar.gz"))
164 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
165 (build-system gnu-build-system)
170 `(#:tests? #t)) ; No tests.
171 (home-page "http://icns.sourceforge.net/")
172 (synopsis "Library for handling Mac OS icns resource files")
174 "Libicns is a library for the manipulation of Mac OS IconFamily resource
175 type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
176 convert between PNG and ICNS. @command{icns2png} will extract image files from
177 ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
178 with .desktop files. Additionally, @command{icontainer2png} is provided for
179 extracting icontainer icon files.")
180 (license (list license:lgpl2.1+ ; libicns
181 license:lgpl2.0+ ; src/apidocs.*
182 license:gpl2+)))) ; icns2png, png2icns, icontainer2png
184 (define-public libtiff
187 (replacement libtiff/fixed)
191 (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-"
194 "136nf1rj9dp5jgv1p7z4dk0xy3wki1w0vfjbk82f645m0w4samsd"))
195 (patches (search-patches
196 "libtiff-oob-accesses-in-decode.patch"
197 "libtiff-oob-write-in-nextdecode.patch"
198 "libtiff-CVE-2015-8665+CVE-2015-8683.patch"))))
199 (build-system gnu-build-system)
201 "doc")) ;1.3 MiB of HTML documentation
203 ;; Instead of using --docdir, this package has its own --with-docdir.
204 `(#:configure-flags (list (string-append "--with-docdir="
205 (assoc-ref %outputs "doc")
207 ,name "-" ,version))))
208 (inputs `(("zlib" ,zlib)
209 ("libjpeg" ,libjpeg)))
210 (synopsis "Library for handling TIFF files")
212 "Libtiff provides support for the Tag Image File Format (TIFF), a format
213 used for storing image data.
214 Included are a library, libtiff, for reading and writing TIFF and a small
215 collection of tools for doing simple manipulations of TIFF images.")
216 (license (license:non-copyleft "file://COPYRIGHT"
217 "See COPYRIGHT in the distribution."))
218 (home-page "http://www.remotesensing.org/libtiff/")))
220 (define libtiff/fixed
224 (inherit (package-source libtiff))
225 (patches (search-patches
226 "libtiff-oob-accesses-in-decode.patch"
227 "libtiff-oob-write-in-nextdecode.patch"
228 "libtiff-CVE-2015-8665+CVE-2015-8683.patch"
229 "libtiff-CVE-2016-3623.patch"
230 "libtiff-CVE-2016-3945.patch"
231 "libtiff-CVE-2016-3990.patch"
232 "libtiff-CVE-2016-3991.patch"
233 "libtiff-CVE-2016-5314.patch"
234 "libtiff-CVE-2016-5321.patch"
235 "libtiff-CVE-2016-5323.patch"))))))
237 (define-public libwmf
244 (uri (string-append "mirror://sourceforge/wvware/"
246 "/" name "-" version ".tar.gz"))
248 (base32 "1y3wba4q8pl7kr51212jwrsz1x6nslsx1gsjml1x0i8549lmqd2v"))
250 (search-patches "libwmf-CAN-2004-0941.patch"
251 "libwmf-CVE-2006-3376.patch"
252 "libwmf-CVE-2007-0455.patch"
253 "libwmf-CVE-2007-2756.patch"
254 "libwmf-CVE-2007-3472.patch"
255 "libwmf-CVE-2007-3473.patch"
256 "libwmf-CVE-2007-3477.patch"
257 "libwmf-CVE-2009-1364.patch"
258 "libwmf-CVE-2009-3546.patch"
259 "libwmf-CVE-2015-0848+CVE-2015-4588.patch"
260 "libwmf-CVE-2015-4695.patch"
261 "libwmf-CVE-2015-4696.patch"))))
263 (build-system gnu-build-system)
265 `(("freetype" ,freetype)
271 `(("pkg-config" ,pkg-config)))
272 (synopsis "Library for reading images in the Microsoft WMF format")
274 "libwmf is a library for reading vector images in Microsoft's native
275 Windows Metafile Format (WMF) and for either (a) displaying them in, e.g., an X
276 window; or (b) converting them to more standard/free file formats such as, e.g.,
277 the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
278 (home-page "http://wvware.sourceforge.net/libwmf.html")
280 ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+.
281 (license license:lgpl2.0+)))
283 (define-public leptonica
290 (uri (string-append "http://www.leptonica.com/source/leptonica-"
293 (base32 "0mhzvqs0im04y1cpcc1yma70hgdac1frf33h73m9z3356bfymmbr"))
294 (modules '((guix build utils)))
295 ;; zlib and openjpg should be under Libs, not Libs.private. See:
296 ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436
298 '(substitute* "lept.pc.in"
299 (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post)
300 (string-append pre post))
301 (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post)
302 (string-append pre post))
304 (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@"))))))
305 (build-system gnu-build-system)
307 `(("gnuplot" ,gnuplot))) ;needed for test suite
313 ("libwebp" ,libwebp)))
315 `(("openjpeg" ,openjpeg)
318 '(#:parallel-tests? #f ; XXX: cause fpix1_reg to fail
320 (modify-phases %standard-phases
321 ;; Prevent make from trying to regenerate config.h.in.
323 'unpack 'set-config-h-in-file-time
325 (set-file-time "config/config.h.in" (stat "configure"))))
327 'unpack 'patch-reg-wrapper
329 (substitute* "prog/reg_wrapper.sh"
331 (string-append " " (which "sh") " "))
332 (("which gnuplot") (which "gnuplot")))))
334 'check 'disable-failing-tests
335 ;; XXX: 2 of 9 tests from webpio_reg fails.
337 (substitute* "prog/webpio_reg.c"
338 ((".*DoWebpTest2.* 90.*") "")
339 ((".*DoWebpTest2.* 100.*") "")))))))
340 (home-page "http://www.leptonica.com/")
341 (synopsis "Library and tools for image processing and analysis")
343 "Leptonica is a C library and set of command-line tools for efficient
344 image processing and image analysis operations. It supports rasterop, affine
345 transformations, binary and grayscale morphology, rank order, and convolution,
346 seedfill and connected components, image transformations combining changes in
347 scale and pixel depth, and pixelwise masking, blending, enhancement, and
349 (license license:bsd-2)))
351 (define-public jbig2dec
358 (uri ;; The link on the homepage is dead.
359 (string-append "http://distfiles.gentoo.org/distfiles/" name "-"
362 (base32 "1ffhgmf2fqzk0h4k736pp06z7q5y4x41fg844bd6a9vgncq86bby"))
363 (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
365 (build-system gnu-build-system)
366 (synopsis "Decoder of the JBIG2 image compression format")
368 "JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit
369 monochrome) images at moderately high resolution, and in particular scanned
370 paper documents. In this domain it is very efficient, offering compression
371 ratios on the order of 100:1.
373 This is a decoder only implementation, and currently is in the alpha
374 stage, meaning it doesn't completely work yet. However, it is
375 maintaining parity with available encoders, so it is useful for real
377 (home-page "http://jbig2dec.sourceforge.net/")
378 (license license:gpl2+)))
380 (define-public openjpeg
388 (string-append "https://github.com/uclouvain/openjpeg/archive/v"
390 (file-name (string-append name "-" version ".tar.gz"))
393 "1anv0rjkbxw9kx91wvlfpb3dhppibda6kb1papny46bjzi3pzhl2"))
394 (patches (search-patches "openjpeg-CVE-2016-5157.patch"
395 "openjpeg-CVE-2016-7163.patch"))))
396 (build-system cmake-build-system)
398 ;; Trying to run `$ make check' results in a no rule fault.
405 (synopsis "JPEG 2000 codec")
407 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
408 been developed in order to promote the use of JPEG 2000, the new
409 still-image compression standard from the Joint Photographic Experts
412 In addition to the basic codec, various other features are under
413 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
414 an indexing tool useful for the JPIP protocol, JPWL-tools for
415 error-resilience, a Java-viewer for j2k-images, ...")
416 (home-page "https://github.com/uclouvain/openjpeg")
417 (license license:bsd-2)))
419 (define-public openjpeg-2.0
420 (package (inherit openjpeg)
427 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
428 name "-" version ".tar.gz"))
430 (base32 "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z"))
431 (patches (search-patches "openjpeg-use-after-free-fix.patch"
432 "openjpeg-CVE-2015-6581.patch"
433 "openjpeg-CVE-2016-7163.patch"))))))
435 (define-public openjpeg-1
436 (package (inherit openjpeg)
443 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
444 name "-" version ".tar.gz"))
446 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
448 (define-public giflib
454 (uri (string-append "mirror://sourceforge/giflib/giflib-"
458 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))))
459 (build-system gnu-build-system)
460 (outputs '("bin" ; utility programs
462 (inputs `(("libx11" ,libx11)
468 (modify-phases %standard-phases
469 (add-after 'unpack 'disable-html-doc-gen
471 (substitute* "doc/Makefile.in"
472 (("^all: allhtml manpages") ""))))
473 (add-after 'install 'install-manpages
474 (lambda* (#:key outputs #:allow-other-keys)
475 (let* ((bin (assoc-ref outputs "bin"))
476 (man1dir (string-append bin "/share/man/man1")))
478 (for-each (lambda (file)
479 (let ((base (basename file)))
480 (format #t "installing `~a' to `~a'~%"
485 (find-files "doc" "\\.1"))))))))
486 (synopsis "Tools and library for working with GIF images")
488 "GIFLIB is a library for reading and writing GIF images. It is API and
489 ABI compatible with libungif which was in wide use while the LZW compression
490 algorithm was patented. Tools are also included to convert, manipulate,
491 compose, and analyze GIF images.")
492 (home-page "http://giflib.sourceforge.net/")
493 (license license:x11)))
495 (define-public libungif
501 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
502 "libungif-" version "/libungif-"
506 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
507 (build-system gnu-build-system)
508 (inputs `(("perl" ,perl))) ;package ships some perl tools
509 (home-page "http://giflib.sourceforge.net/")
510 (synopsis "GIF decompression library")
512 "libungif is the old GIF decompression library by the GIFLIB project.")
513 (license license:expat)))
515 (define-public imlib2
522 "mirror://sourceforge/enlightenment/imlib2-src/" version
523 "/imlib2-" version ".tar.bz2"))
526 "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x"))))
527 (build-system gnu-build-system)
529 `(("pkgconfig" ,pkg-config)))
533 ("freetype" ,freetype)
539 (home-page "http://sourceforge.net/projects/enlightenment/")
541 "Loading, saving, rendering and manipulating image files")
543 "Imlib2 is a library that does image file loading and saving as well as
544 rendering, manipulation, arbitrary polygon support, etc.
546 It does ALL of these operations FAST. Imlib2 also tries to be highly
547 intelligent about doing them, so writing naive programs can be done easily,
548 without sacrificing speed.
550 This is a complete rewrite over the Imlib 1.x series. The architecture is
551 more modular, simple, and flexible.")
552 (license license:imlib2)))
554 (define-public giblib
562 "http://linuxbrit.co.uk/downloads/giblib-"
565 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
566 "files/giblib/giblib-" version ".tar.gz")))
569 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
570 (build-system gnu-build-system)
574 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
575 (synopsis "Wrapper library for imlib2")
577 "Giblib is a simple library which wraps imlib2's context API, avoiding
578 all the context_get/set calls, adds fontstyles to the truetype renderer and
579 supplies a generic doubly-linked list and some string functions.")
580 ;; This license removes a clause about X Consortium from the original
582 (license (license:x11-style "file://COPYING"
583 "See 'COPYING' in the distribution."))))
585 (define-public freeimage
592 "mirror://sourceforge/freeimage/Source%20Distribution/"
594 (string-concatenate (string-split version #\.))
598 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"))
599 (patches (search-patches "freeimage-CVE-2015-0852.patch"))))
600 (build-system gnu-build-system)
602 '(#:phases (alist-delete
605 'build 'patch-makefile
606 (lambda* (#:key outputs #:allow-other-keys)
607 (substitute* "Makefile.gnu"
608 (("/usr") (assoc-ref outputs "out"))
609 (("-o root -g root") "")))
611 #:make-flags '("CC=gcc")
612 #:tests? #f)) ; no check target
615 ;; Fails to build on MIPS due to assembly code in the source.
616 (supported-systems (delete "mips64el-linux" %supported-systems))
617 (synopsis "Library for handling popular graphics image formats")
619 "FreeImage is a library for developers who would like to support popular
620 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
621 (license license:gpl2+)
622 (home-page "http://freeimage.sourceforge.net")))
631 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
632 "Version-1-11-0/vigra-"
633 version "-src.tar.gz"))
635 "1jzm79kqiiilvys3b8mlzy9cvmiirrcwsrlg19qd9rza8zipsqb8"))))
636 (build-system cmake-build-system)
642 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
643 ; to create a configure-flag
648 ("python" ,python-2) ; print syntax
649 ("python2-numpy" ,python2-numpy)
652 `(("doxygen" ,doxygen)
653 ("python2-nose" ,python2-nose)
654 ("python2-sphinx" ,python2-sphinx)))
656 `(#:test-target "check"
657 #:parallel-build? #f ; parallel builds trigger an ICE
659 (list "-Wno-dev" ; suppress developer mode with lots of warnings
660 (string-append "-DVIGRANUMPY_INSTALL_DIR="
661 (assoc-ref %outputs "out")
662 "/lib/python2.7/site-packages")
663 ;; OpenEXR is not enabled by default.
665 ;; The header files of ilmbase are not found when included
666 ;; by the header files of openexr, and an explicit flag
668 (string-append "-DCMAKE_CXX_FLAGS=-I"
669 (assoc-ref %build-inputs "ilmbase")
670 "/include/OpenEXR"))))
671 (synopsis "Computer vision library")
673 "VIGRA stands for Vision with Generic Algorithms. It is an image
674 processing and analysis library that puts its main emphasis on customizable
675 algorithms and data structures. It is particularly strong for
676 multi-dimensional image processing.")
677 (license license:expat)
678 (home-page "https://hci.iwr.uni-heidelberg.de/vigra")))
680 (define-public libwebp
688 "http://downloads.webmproject.org/releases/webp/libwebp-" version
691 (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg"))))
692 (build-system gnu-build-system)
694 `(("freeglut" ,freeglut)
698 ("libtiff" ,libtiff)))
700 '(#:configure-flags '("--enable-libwebpmux"
701 "--enable-libwebpdemux"
702 "--enable-libwebpdecoder")))
703 (home-page "https://developers.google.com/speed/webp/")
704 (synopsis "Lossless and lossy image compression")
706 "WebP is a new image format that provides lossless and lossy compression
707 for images. WebP lossless images are 26% smaller in size compared to
708 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
709 equivalent SSIM index. WebP supports lossless transparency (also known as
710 alpha channel) with just 22% additional bytes. Transparency is also supported
711 with lossy compression and typically provides 3x smaller file sizes compared
712 to PNG when lossy compression is acceptable for the red/green/blue color
714 (license license:bsd-3)))
716 (define-public libmng
722 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
723 version "/" name "-" version ".tar.xz"))
726 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
727 (build-system gnu-build-system)
729 ;; These are all in the 'Libs.private' field of libmng.pc.
733 (home-page "http://www.libmng.com/")
734 (synopsis "Library for handling MNG files")
736 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
737 (license license:bsd-3)))
745 (uri (string-append "http://downloads.sourceforge.net/openil/"
746 "DevIL-" version ".tar.gz"))
749 "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8"))
750 ;; Backported from upstream:
751 ;; https://github.com/DentonW/DevIL/commit/724194d7a9a91221a564579f64bdd6f0abd64219.patch
752 (patches (search-patches "devil-fix-libpng.patch"
753 "devil-CVE-2009-3994.patch"))
754 (modules '((guix build utils)))
756 ;; Fix old lcms include directives and lib flags.
757 '(substitute* '("configure" "src-IL/src/il_profiles.c")
758 (("-llcms") "-llcms2")
759 (("lcms/lcms\\.h") "lcms2/lcms2.h")
760 (("lcms\\.h") "lcms2.h")))))
761 (build-system gnu-build-system)
763 '(#:configure-flags '("--enable-ILUT=yes") ; build utility library
765 (modify-phases %standard-phases
766 (add-before 'check 'fix-tests
767 (lambda* (#:key inputs #:allow-other-keys)
768 ;; Fix hard-coded /bin/bash reference.
769 (substitute* '("test/Makefile")
770 (("TESTS_ENVIRONMENT = /bin/bash")
771 (string-append "TESTS_ENVIRONMENT = "
772 (assoc-ref inputs "bash")
776 `(("pkg-config" ,pkg-config)))
785 (synopsis "Library for manipulating many image formats")
786 (description "Developer's Image Library (DevIL) is a library to develop
787 applications with support for many types of images. DevIL can load, save,
788 convert, manipulate, filter and display a wide variety of image formats.")
789 (home-page "http://openil.sourceforge.net")
790 (license license:lgpl2.1+)))
792 (define-public jasper
798 (uri (string-append "https://www.ece.uvic.ca/~frodo/jasper"
799 "/software/jasper-" version ".zip"))
802 "154l7zk7yh3v8l2l6zm5s2alvd2fzkp6c9i18iajfbna5af5m43b"))
803 (patches (search-patches
804 "jasper-CVE-2007-2721.patch"
805 "jasper-CVE-2008-3520.patch"
806 "jasper-CVE-2008-3522.patch"
807 "jasper-CVE-2011-4516-and-CVE-2011-4517.patch"
808 "jasper-CVE-2014-8137.patch"
809 "jasper-CVE-2014-8138.patch"
810 "jasper-CVE-2014-8157.patch"
811 "jasper-CVE-2014-8158.patch"
812 "jasper-CVE-2014-9029.patch"
813 "jasper-CVE-2016-1577.patch"
814 "jasper-CVE-2016-1867.patch"
815 "jasper-CVE-2016-2089.patch"
816 "jasper-CVE-2016-2116.patch"))))
817 (build-system gnu-build-system)
820 (synopsis "JPEG-2000 library")
821 (description "The JasPer Project is an initiative to provide a reference
822 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
824 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
825 (license (license:x11-style "file://LICENSE"))))
834 (uri (string-append "https://github.com/sekrit-twc/zimg/archive/"
835 "release-" version ".tar.gz"))
836 (file-name (string-append name "-" version ".tar.gz"))
839 "1hqp1gcsa2zhypms5dnasb1srjgxdqm7cip3w5i571kk9nxkn289"))))
840 (build-system gnu-build-system)
842 `(("autoconf" ,autoconf)
843 ("automake" ,automake)
844 ("libtool" ,libtool)))
847 (modify-phases %standard-phases
848 (add-after 'unpack 'autogen
850 (zero? (system* "sh" "autogen.sh")))))))
851 (synopsis "Scaling, colorspace conversion, and dithering library")
852 (description "Zimg implements the commonly required image processing basics
853 of scaling, colorspace conversion, and depth conversion. A simple API enables
854 conversion between any supported formats to operate with minimal knowledge from
856 (home-page "https://github.com/sekrit-twc/zimg")
857 ;; test/extra/ contains musl-libm,
858 ;; which is MIT/expat licensed, but only used for tests
859 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
861 (define-public perceptualdiff
863 (name "perceptualdiff")
868 (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
870 (file-name (string-append name "-" version ".tar.gz"))
873 "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
874 (build-system cmake-build-system)
875 (inputs `(("freeimage" ,freeimage)))
877 '(#:phases (modify-phases %standard-phases
878 (add-after 'unpack 'fix-tests
879 ;; cmake-build-system uses a build/ directory outside
880 ;; of the source tree, one level higher than expected
882 (substitute* "test/run_tests.bash"
883 (("../build") "../../build")))))))
884 (home-page "https://github.com/myint/perceptualdiff")
885 (synopsis "Perceptual image comparison utility")
886 (description "PerceptualDiff visually compares two images to determine
887 whether they look alike. It uses a computational model of the human visual
888 system to detect similarities. This allows it too see beyond irrelevant
889 differences in file encoding, image quality, and other small variations.")
890 (license license:gpl2+)))
892 (define-public steghide
898 (uri (string-append "mirror://sourceforge/steghide/steghide/"
899 version "/steghide-" version ".tar.bz2"))
902 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
903 (patches (list (search-patch "steghide-fixes.patch")))))
904 (build-system gnu-build-system)
906 `(("gettext" ,gnu-gettext)
908 ("perl" ,perl))) ;for tests
910 `(("libmhash" ,libmhash)
911 ("libmcrypt" ,libmcrypt)
915 `(#:make-flags '("CXXFLAGS=-fpermissive"))) ;required for MHashPP.cc
916 (home-page "http://steghide.sourceforge.net")
917 (synopsis "Image and audio steganography")
919 "Steghide is a steganography program that is able to hide data in various
920 kinds of image- and audio-files. The color- respectivly sample-frequencies
921 are not changed thus making the embedding resistant against first-order
923 (license license:gpl2+)))