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>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages image)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages algebra)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages boost)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages documentation)
35 #:use-module (gnu packages fontutils)
36 #:use-module (gnu packages ghostscript)
37 #:use-module (gnu packages gl)
38 #:use-module (gnu packages graphics)
39 #:use-module (gnu packages maths)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages python)
43 #:use-module (gnu packages xml)
44 #:use-module (gnu packages xorg)
45 #:use-module (gnu packages zip)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system cmake)
51 #:use-module (srfi srfi-1))
60 ;; Note: upstream removes older tarballs.
61 (uri (list (string-append "mirror://sourceforge/libpng/libpng15/"
62 version "/libpng-" version ".tar.xz")
64 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
65 "/libpng15/libpng-" version ".tar.xz")))
67 (base32 "0kbissyd7d4ahwdpm968nnzl7q15p6hadg44i9x0vrkrzdgdi93v"))))
68 (build-system gnu-build-system)
70 ;; libpng.la says "-lz", so propagate it.
71 (propagated-inputs `(("zlib" ,zlib)))
73 (synopsis "Library for handling PNG files")
75 "Libpng is the official PNG (Portable Network Graphics) reference
76 library. It supports almost all PNG features and is extensible.")
77 (license license:zlib)
78 (home-page "http://www.libpng.org/pub/png/libpng.html")))
80 (define-public libpng-1.2
87 ;; Note: upstream removes older tarballs.
88 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
89 version "/libpng-" version ".tar.xz")
91 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
92 "/libpng12/libpng-" version ".tar.xz")))
94 (base32 "1ghd03p353x0vi4dk83n1nlldg11w7vqdk3f99rkgfb82ic59ki4"))))))
96 (define-public libjpeg
102 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
105 "19q5zr4n60sjcvfbyv06n4pcl1mai3ipvnd2akflayciinj3wx9s"))))
106 (build-system gnu-build-system)
107 (synopsis "Library for handling JPEG files")
109 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
110 JPEG is a standardized compression method for full-color and gray-scale
112 The included programs provide conversion between the JPEG format and
113 image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.")
114 (license license:ijg)
115 (home-page "http://www.ijg.org/")))
117 (define-public libjpeg-8
118 (package (inherit libjpeg)
122 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
125 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
127 (define-public jpegoptim
133 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
136 "0k53q7dc8w5ashz8v261x2b5vvz7gdvg8w962rz9gjvkjbh4lg93"))))
137 (build-system gnu-build-system)
138 (inputs `(("libjpeg" ,libjpeg)))
142 (synopsis "Optimize JPEG images")
144 "jpegoptim provides lossless optimization (based on optimizing
145 the Huffman tables) and \"lossy\" optimization based on setting
146 maximum quality factor.")
147 (license license:gpl2+)
148 (home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim")))
150 (define-public libtiff
156 (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-"
159 "136nf1rj9dp5jgv1p7z4dk0xy3wki1w0vfjbk82f645m0w4samsd"))
160 (patches (search-patches
161 "libtiff-oob-accesses-in-decode.patch"
162 "libtiff-oob-write-in-nextdecode.patch"
163 "libtiff-CVE-2015-8665+CVE-2015-8683.patch"))))
164 (build-system gnu-build-system)
166 "doc")) ;1.3 MiB of HTML documentation
168 ;; Instead of using --docdir, this package has its own --with-docdir.
169 `(#:configure-flags (list (string-append "--with-docdir="
170 (assoc-ref %outputs "doc")
172 ,name "-" ,version))))
173 (inputs `(("zlib" ,zlib)
174 ("libjpeg" ,libjpeg)))
175 (synopsis "Library for handling TIFF files")
177 "Libtiff provides support for the Tag Image File Format (TIFF), a format
178 used for storing image data.
179 Included are a library, libtiff, for reading and writing TIFF and a small
180 collection of tools for doing simple manipulations of TIFF images.")
181 (license (license:non-copyleft "file://COPYRIGHT"
182 "See COPYRIGHT in the distribution."))
183 (home-page "http://www.remotesensing.org/libtiff/")))
185 (define-public libwmf
192 (uri (string-append "mirror://sourceforge/wvware/"
194 "/" name "-" version ".tar.gz"))
196 (base32 "1y3wba4q8pl7kr51212jwrsz1x6nslsx1gsjml1x0i8549lmqd2v"))
198 (search-patches "libwmf-CAN-2004-0941.patch"
199 "libwmf-CVE-2006-3376.patch"
200 "libwmf-CVE-2007-0455.patch"
201 "libwmf-CVE-2007-2756.patch"
202 "libwmf-CVE-2007-3472.patch"
203 "libwmf-CVE-2007-3473.patch"
204 "libwmf-CVE-2007-3477.patch"
205 "libwmf-CVE-2009-1364.patch"
206 "libwmf-CVE-2009-3546.patch"
207 "libwmf-CVE-2015-0848+CVE-2015-4588.patch"
208 "libwmf-CVE-2015-4695.patch"
209 "libwmf-CVE-2015-4696.patch"))))
211 (build-system gnu-build-system)
213 `(("freetype" ,freetype)
219 `(("pkg-config" ,pkg-config)))
220 (synopsis "Library for reading images in the Microsoft WMF format")
222 "libwmf is a library for reading vector images in Microsoft's native
223 Windows Metafile Format (WMF) and for either (a) displaying them in, e.g., an X
224 window; or (b) converting them to more standard/free file formats such as, e.g.,
225 the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
226 (home-page "http://wvware.sourceforge.net/libwmf.html")
228 ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+.
229 (license license:lgpl2.0+)))
231 (define-public leptonica
238 (uri (string-append "http://www.leptonica.com/source/leptonica-"
241 (base32 "0mhzvqs0im04y1cpcc1yma70hgdac1frf33h73m9z3356bfymmbr"))
242 (modules '((guix build utils)))
243 ;; zlib and openjpg should be under Libs, not Libs.private. See:
244 ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436
246 '(substitute* "lept.pc.in"
247 (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post)
248 (string-append pre post))
249 (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post)
250 (string-append pre post))
252 (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@"))))))
253 (build-system gnu-build-system)
255 `(("gnuplot" ,gnuplot))) ;needed for test suite
261 ("libwebp" ,libwebp)))
263 `(("openjpeg" ,openjpeg)
266 '(#:parallel-tests? #f ; XXX: cause fpix1_reg to fail
268 (modify-phases %standard-phases
269 ;; Prevent make from trying to regenerate config.h.in.
271 'unpack 'set-config-h-in-file-time
273 (set-file-time "config/config.h.in" (stat "configure"))))
275 'unpack 'patch-reg-wrapper
277 (substitute* "prog/reg_wrapper.sh"
279 (string-append " " (which "sh") " "))
280 (("which gnuplot") (which "gnuplot")))))
282 'check 'disable-failing-tests
283 ;; XXX: 2 of 9 tests from webpio_reg fails.
285 (substitute* "prog/webpio_reg.c"
286 ((".*DoWebpTest2.* 90.*") "")
287 ((".*DoWebpTest2.* 100.*") "")))))))
288 (home-page "http://www.leptonica.com/")
289 (synopsis "Library and tools for image processing and analysis")
291 "Leptonica is a C library and set of command-line tools for efficient
292 image processing and image analysis operations. It supports rasterop, affine
293 transformations, binary and grayscale morphology, rank order, and convolution,
294 seedfill and connected components, image transformations combining changes in
295 scale and pixel depth, and pixelwise masking, blending, enhancement, and
297 (license license:bsd-2)))
299 (define-public jbig2dec
306 (uri ;; The link on the homepage is dead.
307 (string-append "http://distfiles.gentoo.org/distfiles/" name "-"
310 (base32 "1ffhgmf2fqzk0h4k736pp06z7q5y4x41fg844bd6a9vgncq86bby"))
311 (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
313 (build-system gnu-build-system)
314 (synopsis "Decoder of the JBIG2 image compression format")
316 "JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit
317 monochrome) images at moderately high resolution, and in particular scanned
318 paper documents. In this domain it is very efficient, offering compression
319 ratios on the order of 100:1.
321 This is a decoder only implementation, and currently is in the alpha
322 stage, meaning it doesn't completely work yet. However, it is
323 maintaining parity with available encoders, so it is useful for real
325 (home-page "http://jbig2dec.sourceforge.net/")
326 (license license:gpl2+)))
328 (define-public openjpeg
336 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
337 name "-" version ".tar.gz"))
339 (base32 "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj"))
340 (patches (search-patches "openjpeg-use-after-free-fix.patch"
341 "openjpeg-CVE-2015-6581.patch"))))
342 (build-system cmake-build-system)
344 ;; Trying to run `$ make check' results in a no rule fault.
351 (synopsis "JPEG 2000 codec")
353 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
354 been developed in order to promote the use of JPEG 2000, the new
355 still-image compression standard from the Joint Photographic Experts
358 In addition to the basic codec, various other features are under
359 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
360 an indexing tool useful for the JPIP protocol, JPWL-tools for
361 error-resilience, a Java-viewer for j2k-images, ...")
362 (home-page "https://github.com/uclouvain/openjpeg")
363 (license license:bsd-2)))
365 (define-public openjpeg-2.0
366 (package (inherit openjpeg)
373 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
374 name "-" version ".tar.gz"))
376 (base32 "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z"))
377 (patches (search-patches "openjpeg-use-after-free-fix.patch"
378 "openjpeg-CVE-2015-6581.patch"))))))
380 (define-public openjpeg-1
381 (package (inherit openjpeg)
388 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
389 name "-" version ".tar.gz"))
391 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
393 (define-public giflib
399 (uri (string-append "mirror://sourceforge/giflib/giflib-"
403 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))))
404 (build-system gnu-build-system)
405 (outputs '("bin" ; utility programs
407 (inputs `(("libx11" ,libx11)
413 (modify-phases %standard-phases
414 (add-after 'unpack 'disable-html-doc-gen
416 (substitute* "doc/Makefile.in"
417 (("^all: allhtml manpages") ""))))
418 (add-after 'install 'install-manpages
419 (lambda* (#:key outputs #:allow-other-keys)
420 (let* ((bin (assoc-ref outputs "bin"))
421 (man1dir (string-append bin "/share/man/man1")))
423 (for-each (lambda (file)
424 (let ((base (basename file)))
425 (format #t "installing `~a' to `~a'~%"
430 (find-files "doc" "\\.1"))))))))
431 (synopsis "Tools and library for working with GIF images")
433 "GIFLIB is a library for reading and writing GIF images. It is API and
434 ABI compatible with libungif which was in wide use while the LZW compression
435 algorithm was patented. Tools are also included to convert, manipulate,
436 compose, and analyze GIF images.")
437 (home-page "http://giflib.sourceforge.net/")
438 (license license:x11)))
440 (define-public libungif
446 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
447 "libungif-" version "/libungif-"
451 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
452 (build-system gnu-build-system)
453 (inputs `(("perl" ,perl))) ;package ships some perl tools
454 (home-page "http://giflib.sourceforge.net/")
455 (synopsis "GIF decompression library")
457 "libungif is the old GIF decompression library by the GIFLIB project.")
458 (license license:expat)))
460 (define-public imlib2
467 "mirror://sourceforge/enlightenment/imlib2-src/" version
468 "/imlib2-" version ".tar.bz2"))
471 "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x"))))
472 (build-system gnu-build-system)
474 `(("pkgconfig" ,pkg-config)))
478 ("freetype" ,freetype)
484 (home-page "http://sourceforge.net/projects/enlightenment/")
486 "Loading, saving, rendering and manipulating image files")
488 "Imlib2 is a library that does image file loading and saving as well as
489 rendering, manipulation, arbitrary polygon support, etc.
491 It does ALL of these operations FAST. Imlib2 also tries to be highly
492 intelligent about doing them, so writing naive programs can be done easily,
493 without sacrificing speed.
495 This is a complete rewrite over the Imlib 1.x series. The architecture is
496 more modular, simple, and flexible.")
497 (license license:imlib2)))
499 (define-public giblib
507 "http://linuxbrit.co.uk/downloads/giblib-"
510 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
511 "files/giblib/giblib-" version ".tar.gz")))
514 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
515 (build-system gnu-build-system)
519 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
520 (synopsis "Wrapper library for imlib2")
522 "Giblib is a simple library which wraps imlib2's context API, avoiding
523 all the context_get/set calls, adds fontstyles to the truetype renderer and
524 supplies a generic doubly-linked list and some string functions.")
525 ;; This license removes a clause about X Consortium from the original
527 (license (license:x11-style "file://COPYING"
528 "See 'COPYING' in the distribution."))))
530 (define-public freeimage
537 "mirror://sourceforge/freeimage/Source%20Distribution/"
539 (string-concatenate (string-split version #\.))
543 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"))
544 (patches (search-patches "freeimage-CVE-2015-0852.patch"))))
545 (build-system gnu-build-system)
547 '(#:phases (alist-delete
550 'build 'patch-makefile
551 (lambda* (#:key outputs #:allow-other-keys)
552 (substitute* "Makefile.gnu"
553 (("/usr") (assoc-ref outputs "out"))
554 (("-o root -g root") "")))
556 #:make-flags '("CC=gcc")
557 #:tests? #f)) ; no check target
560 ;; Fails to build on MIPS due to assembly code in the source.
561 (supported-systems (delete "mips64el-linux" %supported-systems))
562 (synopsis "Library for handling popular graphics image formats")
564 "FreeImage is a library for developers who would like to support popular
565 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
566 (license license:gpl2+)
567 (home-page "http://freeimage.sourceforge.net")))
576 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
577 "Version-1-11-0/vigra-"
578 version "-src.tar.gz"))
580 "1jzm79kqiiilvys3b8mlzy9cvmiirrcwsrlg19qd9rza8zipsqb8"))))
581 (build-system cmake-build-system)
587 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
588 ; to create a configure-flag
593 ("python" ,python-2) ; print syntax
594 ("python2-numpy" ,python2-numpy)
597 `(("doxygen" ,doxygen)
598 ("python2-nose" ,python2-nose)
599 ("python2-sphinx" ,python2-sphinx)))
601 `(#:test-target "check"
602 #:parallel-build? #f ; parallel builds trigger an ICE
604 (list "-Wno-dev" ; suppress developer mode with lots of warnings
605 (string-append "-DVIGRANUMPY_INSTALL_DIR="
606 (assoc-ref %outputs "out")
607 "/lib/python2.7/site-packages")
608 ;; OpenEXR is not enabled by default.
610 ;; The header files of ilmbase are not found when included
611 ;; by the header files of openexr, and an explicit flag
613 (string-append "-DCMAKE_CXX_FLAGS=-I"
614 (assoc-ref %build-inputs "ilmbase")
615 "/include/OpenEXR"))))
616 (synopsis "Computer vision library")
618 "VIGRA stands for Vision with Generic Algorithms. It is an image
619 processing and analysis library that puts its main emphasis on customizable
620 algorithms and data structures. It is particularly strong for
621 multi-dimensional image processing.")
622 (license license:expat)
623 (home-page "https://hci.iwr.uni-heidelberg.de/vigra")))
625 (define-public libwebp
633 "http://downloads.webmproject.org/releases/webp/libwebp-" version
636 (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg"))))
637 (build-system gnu-build-system)
639 `(("freeglut" ,freeglut)
643 ("libtiff" ,libtiff)))
645 '(#:configure-flags '("--enable-libwebpmux"
646 "--enable-libwebpdemux"
647 "--enable-libwebpdecoder")))
648 (home-page "https://developers.google.com/speed/webp/")
649 (synopsis "Lossless and lossy image compression")
651 "WebP is a new image format that provides lossless and lossy compression
652 for images. WebP lossless images are 26% smaller in size compared to
653 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
654 equivalent SSIM index. WebP supports lossless transparency (also known as
655 alpha channel) with just 22% additional bytes. Transparency is also supported
656 with lossy compression and typically provides 3x smaller file sizes compared
657 to PNG when lossy compression is acceptable for the red/green/blue color
659 (license license:bsd-3)))
661 (define-public libmng
667 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
668 version "/" name "-" version ".tar.xz"))
671 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
672 (build-system gnu-build-system)
674 ;; These are all in the 'Libs.private' field of libmng.pc.
678 (home-page "http://www.libmng.com/")
679 (synopsis "Library for handling MNG files")
681 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
682 (license license:bsd-3)))
690 (uri (string-append "http://downloads.sourceforge.net/openil/"
691 "DevIL-" version ".tar.gz"))
694 "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8"))
695 ;; Backported from upstream:
696 ;; https://github.com/DentonW/DevIL/commit/724194d7a9a91221a564579f64bdd6f0abd64219.patch
697 (patches (search-patches "devil-fix-libpng.patch"
698 "devil-CVE-2009-3994.patch"))
699 (modules '((guix build utils)))
701 ;; Fix old lcms include directives and lib flags.
702 '(substitute* '("configure" "src-IL/src/il_profiles.c")
703 (("-llcms") "-llcms2")
704 (("lcms/lcms\\.h") "lcms2/lcms2.h")
705 (("lcms\\.h") "lcms2.h")))))
706 (build-system gnu-build-system)
708 '(#:configure-flags '("--enable-ILUT=yes") ; build utility library
710 (modify-phases %standard-phases
711 (add-before 'check 'fix-tests
712 (lambda* (#:key inputs #:allow-other-keys)
713 ;; Fix hard-coded /bin/bash reference.
714 (substitute* '("test/Makefile")
715 (("TESTS_ENVIRONMENT = /bin/bash")
716 (string-append "TESTS_ENVIRONMENT = "
717 (assoc-ref inputs "bash")
721 `(("pkg-config" ,pkg-config)))
730 (synopsis "Library for manipulating many image formats")
731 (description "Developer's Image Library (DevIL) is a library to develop
732 applications with support for many types of images. DevIL can load, save,
733 convert, manipulate, filter and display a wide variety of image formats.")
734 (home-page "http://openil.sourceforge.net")
735 (license license:lgpl2.1+)))
737 (define-public jasper
743 (uri (string-append "https://www.ece.uvic.ca/~frodo/jasper"
744 "/software/jasper-" version ".zip"))
747 "154l7zk7yh3v8l2l6zm5s2alvd2fzkp6c9i18iajfbna5af5m43b"))
748 (patches (search-patches
749 "jasper-CVE-2007-2721.patch"
750 "jasper-CVE-2008-3520.patch"
751 "jasper-CVE-2008-3522.patch"
752 "jasper-CVE-2011-4516-and-CVE-2011-4517.patch"
753 "jasper-CVE-2014-8137.patch"
754 "jasper-CVE-2014-8138.patch"
755 "jasper-CVE-2014-8157.patch"
756 "jasper-CVE-2014-8158.patch"
757 "jasper-CVE-2014-9029.patch"
758 "jasper-CVE-2016-1577.patch"
759 "jasper-CVE-2016-1867.patch"
760 "jasper-CVE-2016-2089.patch"
761 "jasper-CVE-2016-2116.patch"))))
762 (build-system gnu-build-system)
765 (synopsis "JPEG-2000 library")
766 (description "The JasPer Project is an initiative to provide a reference
767 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
769 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
770 (license (license:x11-style "file://LICENSE"))))
779 (uri (string-append "https://github.com/sekrit-twc/zimg/archive/"
780 "release-" version ".tar.gz"))
781 (file-name (string-append name "-" version ".tar.gz"))
784 "1hqp1gcsa2zhypms5dnasb1srjgxdqm7cip3w5i571kk9nxkn289"))))
785 (build-system gnu-build-system)
787 `(("autoconf" ,autoconf)
788 ("automake" ,automake)
789 ("libtool" ,libtool)))
792 (modify-phases %standard-phases
793 (add-after 'unpack 'autogen
795 (zero? (system* "sh" "autogen.sh")))))))
796 (synopsis "Scaling, colorspace conversion, and dithering library")
797 (description "Zimg implements the commonly required image processing basics
798 of scaling, colorspace conversion, and depth conversion. A simple API enables
799 conversion between any supported formats to operate with minimal knowledge from
801 (home-page "https://github.com/sekrit-twc/zimg")
802 ;; test/extra/ contains musl-libm,
803 ;; which is MIT/expat licensed, but only used for tests
804 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
806 (define-public perceptualdiff
808 (name "perceptualdiff")
813 (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
815 (file-name (string-append name "-" version ".tar.gz"))
818 "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
819 (build-system cmake-build-system)
820 (inputs `(("freeimage" ,freeimage)))
822 '(#:phases (modify-phases %standard-phases
823 (add-after 'unpack 'fix-tests
824 ;; cmake-build-system uses a build/ directory outside
825 ;; of the source tree, one level higher than expected
827 (substitute* "test/run_tests.bash"
828 (("../build") "../../build")))))))
829 (home-page "https://github.com/myint/perceptualdiff")
830 (synopsis "Perceptual image comparison utility")
831 (description "PerceptualDiff visually compares two images to determine
832 whether they look alike. It uses a computational model of the human visual
833 system to detect similarities. This allows it too see beyond irrelevant
834 differences in file encoding, image quality, and other small variations.")
835 (license license:gpl2+)))