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 (build-system cmake-build-system)
396 ;; Trying to run `$ make check' results in a no rule fault.
403 (synopsis "JPEG 2000 codec")
405 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
406 been developed in order to promote the use of JPEG 2000, the new
407 still-image compression standard from the Joint Photographic Experts
410 In addition to the basic codec, various other features are under
411 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
412 an indexing tool useful for the JPIP protocol, JPWL-tools for
413 error-resilience, a Java-viewer for j2k-images, ...")
414 (home-page "https://github.com/uclouvain/openjpeg")
415 (license license:bsd-2)))
417 (define-public openjpeg-2.0
418 (package (inherit openjpeg)
425 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
426 name "-" version ".tar.gz"))
428 (base32 "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z"))
429 (patches (search-patches "openjpeg-use-after-free-fix.patch"
430 "openjpeg-CVE-2015-6581.patch"))))))
432 (define-public openjpeg-1
433 (package (inherit openjpeg)
440 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
441 name "-" version ".tar.gz"))
443 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
445 (define-public giflib
451 (uri (string-append "mirror://sourceforge/giflib/giflib-"
455 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))))
456 (build-system gnu-build-system)
457 (outputs '("bin" ; utility programs
459 (inputs `(("libx11" ,libx11)
465 (modify-phases %standard-phases
466 (add-after 'unpack 'disable-html-doc-gen
468 (substitute* "doc/Makefile.in"
469 (("^all: allhtml manpages") ""))))
470 (add-after 'install 'install-manpages
471 (lambda* (#:key outputs #:allow-other-keys)
472 (let* ((bin (assoc-ref outputs "bin"))
473 (man1dir (string-append bin "/share/man/man1")))
475 (for-each (lambda (file)
476 (let ((base (basename file)))
477 (format #t "installing `~a' to `~a'~%"
482 (find-files "doc" "\\.1"))))))))
483 (synopsis "Tools and library for working with GIF images")
485 "GIFLIB is a library for reading and writing GIF images. It is API and
486 ABI compatible with libungif which was in wide use while the LZW compression
487 algorithm was patented. Tools are also included to convert, manipulate,
488 compose, and analyze GIF images.")
489 (home-page "http://giflib.sourceforge.net/")
490 (license license:x11)))
492 (define-public libungif
498 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
499 "libungif-" version "/libungif-"
503 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
504 (build-system gnu-build-system)
505 (inputs `(("perl" ,perl))) ;package ships some perl tools
506 (home-page "http://giflib.sourceforge.net/")
507 (synopsis "GIF decompression library")
509 "libungif is the old GIF decompression library by the GIFLIB project.")
510 (license license:expat)))
512 (define-public imlib2
519 "mirror://sourceforge/enlightenment/imlib2-src/" version
520 "/imlib2-" version ".tar.bz2"))
523 "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x"))))
524 (build-system gnu-build-system)
526 `(("pkgconfig" ,pkg-config)))
530 ("freetype" ,freetype)
536 (home-page "http://sourceforge.net/projects/enlightenment/")
538 "Loading, saving, rendering and manipulating image files")
540 "Imlib2 is a library that does image file loading and saving as well as
541 rendering, manipulation, arbitrary polygon support, etc.
543 It does ALL of these operations FAST. Imlib2 also tries to be highly
544 intelligent about doing them, so writing naive programs can be done easily,
545 without sacrificing speed.
547 This is a complete rewrite over the Imlib 1.x series. The architecture is
548 more modular, simple, and flexible.")
549 (license license:imlib2)))
551 (define-public giblib
559 "http://linuxbrit.co.uk/downloads/giblib-"
562 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
563 "files/giblib/giblib-" version ".tar.gz")))
566 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
567 (build-system gnu-build-system)
571 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
572 (synopsis "Wrapper library for imlib2")
574 "Giblib is a simple library which wraps imlib2's context API, avoiding
575 all the context_get/set calls, adds fontstyles to the truetype renderer and
576 supplies a generic doubly-linked list and some string functions.")
577 ;; This license removes a clause about X Consortium from the original
579 (license (license:x11-style "file://COPYING"
580 "See 'COPYING' in the distribution."))))
582 (define-public freeimage
589 "mirror://sourceforge/freeimage/Source%20Distribution/"
591 (string-concatenate (string-split version #\.))
595 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"))
596 (patches (search-patches "freeimage-CVE-2015-0852.patch"))))
597 (build-system gnu-build-system)
599 '(#:phases (alist-delete
602 'build 'patch-makefile
603 (lambda* (#:key outputs #:allow-other-keys)
604 (substitute* "Makefile.gnu"
605 (("/usr") (assoc-ref outputs "out"))
606 (("-o root -g root") "")))
608 #:make-flags '("CC=gcc")
609 #:tests? #f)) ; no check target
612 ;; Fails to build on MIPS due to assembly code in the source.
613 (supported-systems (delete "mips64el-linux" %supported-systems))
614 (synopsis "Library for handling popular graphics image formats")
616 "FreeImage is a library for developers who would like to support popular
617 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
618 (license license:gpl2+)
619 (home-page "http://freeimage.sourceforge.net")))
628 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
629 "Version-1-11-0/vigra-"
630 version "-src.tar.gz"))
632 "1jzm79kqiiilvys3b8mlzy9cvmiirrcwsrlg19qd9rza8zipsqb8"))))
633 (build-system cmake-build-system)
639 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
640 ; to create a configure-flag
645 ("python" ,python-2) ; print syntax
646 ("python2-numpy" ,python2-numpy)
649 `(("doxygen" ,doxygen)
650 ("python2-nose" ,python2-nose)
651 ("python2-sphinx" ,python2-sphinx)))
653 `(#:test-target "check"
654 #:parallel-build? #f ; parallel builds trigger an ICE
656 (list "-Wno-dev" ; suppress developer mode with lots of warnings
657 (string-append "-DVIGRANUMPY_INSTALL_DIR="
658 (assoc-ref %outputs "out")
659 "/lib/python2.7/site-packages")
660 ;; OpenEXR is not enabled by default.
662 ;; The header files of ilmbase are not found when included
663 ;; by the header files of openexr, and an explicit flag
665 (string-append "-DCMAKE_CXX_FLAGS=-I"
666 (assoc-ref %build-inputs "ilmbase")
667 "/include/OpenEXR"))))
668 (synopsis "Computer vision library")
670 "VIGRA stands for Vision with Generic Algorithms. It is an image
671 processing and analysis library that puts its main emphasis on customizable
672 algorithms and data structures. It is particularly strong for
673 multi-dimensional image processing.")
674 (license license:expat)
675 (home-page "https://hci.iwr.uni-heidelberg.de/vigra")))
677 (define-public libwebp
685 "http://downloads.webmproject.org/releases/webp/libwebp-" version
688 (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg"))))
689 (build-system gnu-build-system)
691 `(("freeglut" ,freeglut)
695 ("libtiff" ,libtiff)))
697 '(#:configure-flags '("--enable-libwebpmux"
698 "--enable-libwebpdemux"
699 "--enable-libwebpdecoder")))
700 (home-page "https://developers.google.com/speed/webp/")
701 (synopsis "Lossless and lossy image compression")
703 "WebP is a new image format that provides lossless and lossy compression
704 for images. WebP lossless images are 26% smaller in size compared to
705 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
706 equivalent SSIM index. WebP supports lossless transparency (also known as
707 alpha channel) with just 22% additional bytes. Transparency is also supported
708 with lossy compression and typically provides 3x smaller file sizes compared
709 to PNG when lossy compression is acceptable for the red/green/blue color
711 (license license:bsd-3)))
713 (define-public libmng
719 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
720 version "/" name "-" version ".tar.xz"))
723 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
724 (build-system gnu-build-system)
726 ;; These are all in the 'Libs.private' field of libmng.pc.
730 (home-page "http://www.libmng.com/")
731 (synopsis "Library for handling MNG files")
733 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
734 (license license:bsd-3)))
742 (uri (string-append "http://downloads.sourceforge.net/openil/"
743 "DevIL-" version ".tar.gz"))
746 "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8"))
747 ;; Backported from upstream:
748 ;; https://github.com/DentonW/DevIL/commit/724194d7a9a91221a564579f64bdd6f0abd64219.patch
749 (patches (search-patches "devil-fix-libpng.patch"
750 "devil-CVE-2009-3994.patch"))
751 (modules '((guix build utils)))
753 ;; Fix old lcms include directives and lib flags.
754 '(substitute* '("configure" "src-IL/src/il_profiles.c")
755 (("-llcms") "-llcms2")
756 (("lcms/lcms\\.h") "lcms2/lcms2.h")
757 (("lcms\\.h") "lcms2.h")))))
758 (build-system gnu-build-system)
760 '(#:configure-flags '("--enable-ILUT=yes") ; build utility library
762 (modify-phases %standard-phases
763 (add-before 'check 'fix-tests
764 (lambda* (#:key inputs #:allow-other-keys)
765 ;; Fix hard-coded /bin/bash reference.
766 (substitute* '("test/Makefile")
767 (("TESTS_ENVIRONMENT = /bin/bash")
768 (string-append "TESTS_ENVIRONMENT = "
769 (assoc-ref inputs "bash")
773 `(("pkg-config" ,pkg-config)))
782 (synopsis "Library for manipulating many image formats")
783 (description "Developer's Image Library (DevIL) is a library to develop
784 applications with support for many types of images. DevIL can load, save,
785 convert, manipulate, filter and display a wide variety of image formats.")
786 (home-page "http://openil.sourceforge.net")
787 (license license:lgpl2.1+)))
789 (define-public jasper
795 (uri (string-append "https://www.ece.uvic.ca/~frodo/jasper"
796 "/software/jasper-" version ".zip"))
799 "154l7zk7yh3v8l2l6zm5s2alvd2fzkp6c9i18iajfbna5af5m43b"))
800 (patches (search-patches
801 "jasper-CVE-2007-2721.patch"
802 "jasper-CVE-2008-3520.patch"
803 "jasper-CVE-2008-3522.patch"
804 "jasper-CVE-2011-4516-and-CVE-2011-4517.patch"
805 "jasper-CVE-2014-8137.patch"
806 "jasper-CVE-2014-8138.patch"
807 "jasper-CVE-2014-8157.patch"
808 "jasper-CVE-2014-8158.patch"
809 "jasper-CVE-2014-9029.patch"
810 "jasper-CVE-2016-1577.patch"
811 "jasper-CVE-2016-1867.patch"
812 "jasper-CVE-2016-2089.patch"
813 "jasper-CVE-2016-2116.patch"))))
814 (build-system gnu-build-system)
817 (synopsis "JPEG-2000 library")
818 (description "The JasPer Project is an initiative to provide a reference
819 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
821 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
822 (license (license:x11-style "file://LICENSE"))))
831 (uri (string-append "https://github.com/sekrit-twc/zimg/archive/"
832 "release-" version ".tar.gz"))
833 (file-name (string-append name "-" version ".tar.gz"))
836 "1hqp1gcsa2zhypms5dnasb1srjgxdqm7cip3w5i571kk9nxkn289"))))
837 (build-system gnu-build-system)
839 `(("autoconf" ,autoconf)
840 ("automake" ,automake)
841 ("libtool" ,libtool)))
844 (modify-phases %standard-phases
845 (add-after 'unpack 'autogen
847 (zero? (system* "sh" "autogen.sh")))))))
848 (synopsis "Scaling, colorspace conversion, and dithering library")
849 (description "Zimg implements the commonly required image processing basics
850 of scaling, colorspace conversion, and depth conversion. A simple API enables
851 conversion between any supported formats to operate with minimal knowledge from
853 (home-page "https://github.com/sekrit-twc/zimg")
854 ;; test/extra/ contains musl-libm,
855 ;; which is MIT/expat licensed, but only used for tests
856 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
858 (define-public perceptualdiff
860 (name "perceptualdiff")
865 (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
867 (file-name (string-append name "-" version ".tar.gz"))
870 "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
871 (build-system cmake-build-system)
872 (inputs `(("freeimage" ,freeimage)))
874 '(#:phases (modify-phases %standard-phases
875 (add-after 'unpack 'fix-tests
876 ;; cmake-build-system uses a build/ directory outside
877 ;; of the source tree, one level higher than expected
879 (substitute* "test/run_tests.bash"
880 (("../build") "../../build")))))))
881 (home-page "https://github.com/myint/perceptualdiff")
882 (synopsis "Perceptual image comparison utility")
883 (description "PerceptualDiff visually compares two images to determine
884 whether they look alike. It uses a computational model of the human visual
885 system to detect similarities. This allows it too see beyond irrelevant
886 differences in file encoding, image quality, and other small variations.")
887 (license license:gpl2+)))
889 (define-public steghide
895 (uri (string-append "mirror://sourceforge/steghide/steghide/"
896 version "/steghide-" version ".tar.bz2"))
899 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
900 (patches (list (search-patch "steghide-fixes.patch")))))
901 (build-system gnu-build-system)
903 `(("gettext" ,gnu-gettext)
905 ("perl" ,perl))) ;for tests
907 `(("libmhash" ,libmhash)
908 ("libmcrypt" ,libmcrypt)
912 `(#:make-flags '("CXXFLAGS=-fpermissive"))) ;required for MHashPP.cc
913 (home-page "http://steghide.sourceforge.net")
914 (synopsis "Image and audio steganography")
916 "Steghide is a steganography program that is able to hide data in various
917 kinds of image- and audio-files. The color- respectivly sample-frequencies
918 are not changed thus making the embedding resistant against first-order
920 (license license:gpl2+)))