1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2014, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
9 ;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
10 ;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
13 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
15 ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
16 ;;; Copyright © 2017 ng0 <ng0@n0.is>
17 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
18 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
19 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
20 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
21 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
22 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
24 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
25 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
27 ;;; This file is part of GNU Guix.
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42 (define-module (gnu packages image)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages algebra)
45 #:use-module (gnu packages assembly)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages curl)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages freedesktop)
54 ;; To provide gcc@5 and gcc@6, to work around <http://bugs.gnu.org/24703>.
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages ghostscript)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages graphics)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages lua)
63 #:use-module (gnu packages man)
64 #:use-module (gnu packages maths)
65 #:use-module (gnu packages mcrypt)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages photo)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-xyz)
71 #:use-module (gnu packages sphinx)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages qt)
75 #:use-module ((guix licenses) #:prefix license:)
76 #:use-module (guix packages)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module (guix build-system gnu)
80 #:use-module (guix build-system cmake)
81 #:use-module (guix build-system meson)
82 #:use-module (guix build-system python)
83 #:use-module (guix build-system r)
84 #:use-module (guix build-system scons)
85 #:use-module (srfi srfi-1))
91 (replacement libpng-1.6.37)
94 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
95 version "/libpng-" version ".tar.xz")
97 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
98 "/libpng16/libpng-" version ".tar.xz")
100 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
101 "/libpng16/libpng-" version ".tar.xz")))
104 "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig"))))
105 (build-system gnu-build-system)
107 ;; libpng.la says "-lz", so propagate it.
108 (propagated-inputs `(("zlib" ,zlib)))
110 (synopsis "Library for handling PNG files")
112 "Libpng is the official PNG (Portable Network Graphics) reference
113 library. It supports almost all PNG features and is extensible.")
114 (license license:zlib)
115 (home-page "http://www.libpng.org/pub/png/libpng.html")))
117 ;; This graft exists to fix CVE-2018-14048, CVE-2018-14550, and CVE-2019-7317.
118 (define-public libpng-1.6.37
124 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
125 version "/libpng-" version ".tar.xz")
127 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
128 "/libpng16/libpng-" version ".tar.xz")
130 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
131 "/libpng16/libpng-" version ".tar.xz")))
134 "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh"))))))
136 ;; libpng-apng should be updated when the APNG patch is released:
137 ;; <https://bugs.gnu.org/27556>
138 (define-public libpng-apng
145 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
146 version "/libpng-" version ".tar.xz")
148 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
149 "/libpng16/libpng-" version ".tar.xz")
151 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
152 "/libpng16/libpng-" version ".tar.xz")))
155 "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq"))))
156 (build-system gnu-build-system)
158 `(#:modules ((guix build gnu-build-system)
162 (modify-phases %standard-phases
163 (add-after 'unpack 'patch-apng
164 (lambda* (#:key inputs #:allow-other-keys)
165 (define (apply-patch file)
166 (invoke "patch" "-p1" "--force"
168 (let ((apng.gz (assoc-ref inputs "apng")))
169 (format #t "Applying APNG patch '~a'...~%"
172 (string-append "gunzip < " apng.gz " > the-patch"))
173 (apply-patch "the-patch")
175 (add-before 'configure 'no-checks
177 (substitute* "Makefile.in"
178 (("^scripts/symbols.chk") "")
179 (("check: scripts/symbols.chk") ""))
185 (string-append "mirror://sourceforge/libpng-apng/libpng16/"
186 version "/libpng-" version "-apng.patch.gz"))
189 "0m5nv70n9903x3xzxw9qqc6sgf2rp106ha0x6gix0xf8wcrljaab"))))))
191 `(("libtool" ,libtool)))
192 ;; libpng.la says "-lz", so propagate it.
195 (synopsis "APNG patch for libpng")
197 "APNG (Animated Portable Network Graphics) is an unofficial
198 extension of the APNG (Portable Network Graphics) format.
199 APNG patch provides APNG support to libpng.")
200 (home-page "https://sourceforge.net/projects/libpng-apng/")
201 (license license:zlib)))
203 (define-public libpng-1.2
210 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
211 version "/libpng-" version ".tar.xz")
213 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
214 "/libpng12/libpng-" version ".tar.xz")
216 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
217 "/libpng12/libpng-" version ".tar.xz")))
220 "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl"))))))
222 (define-public pngcrush
228 (uri (string-append "mirror://sourceforge/pmt/pngcrush/"
229 version "/pngcrush-" version "-nolib.tar.xz"))
231 "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv"))))
232 (build-system gnu-build-system)
234 '(#:tests? #f ; no check target
236 (modify-phases %standard-phases
238 (lambda* (#:key inputs outputs #:allow-other-keys)
239 (substitute* "Makefile"
240 (("^(PNG(INC|LIB) = )/usr/local/" line vardef)
241 (string-append vardef (assoc-ref inputs "libpng") "/"))
242 (("^(Z(INC|LIB) = )/usr/local/" line vardef)
243 (string-append vardef (assoc-ref inputs "zlib") "/"))
244 ;; The Makefile is written by hand and not using $PREFIX
245 (("\\$\\(DESTDIR\\)/usr/")
246 (string-append (assoc-ref outputs "out") "/")))
251 (home-page "https://pmt.sourceforge.io/pngcrush")
252 (synopsis "Utility to compress PNG files")
253 (description "pngcrusqh is an optimizer for PNG (Portable Network Graphics)
254 files. It can compress them as much as 40% losslessly.")
255 (license license:zlib)))
257 (define-public pngcrunch
258 ;; This package used to be wrongfully name "pngcrunch".
259 (deprecated-package "pngcrunch" pngcrush))
261 (define-public pnglite
262 (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
266 ;; The project was moved from sourceforge to github.
267 ;; The latest version in sourceforge was 0.1.17:
268 ;; https://sourceforge.net/projects/pnglite/files/pnglite/
269 ;; No releases are made in github.
270 (version (git-version "0.1.17" revision commit))
274 (url "https://github.com/dankar/pnglite")
278 "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby"))
279 (file-name (git-file-name name version))))
280 (build-system gnu-build-system)
282 `(#:tests? #f ; no tests
284 (modify-phases %standard-phases
288 ;; common build flags for building shared libraries
289 (let ((cflags '("-O2" "-g" "-fPIC"))
290 (ldflags '("-shared")))
299 (lambda* (#:key outputs #:allow-other-keys)
300 (let* ((out (assoc-ref outputs "out"))
301 (lib (string-append out "/lib/"))
302 (include (string-append out "/include/"))
303 (doc (string-append out "/share/doc/"
304 ,name "-" ,version "/")))
305 (install-file "libpnglite.so" lib)
306 (install-file "pnglite.h" include)
307 (install-file "README.md" doc)
309 (inputs `(("zlib" ,zlib)))
310 (home-page "https://github.com/dankar/pnglite")
311 (synopsis "Pretty small png library")
312 (description "A pretty small png library.
313 Currently all documentation resides in @file{pnglite.h}.")
314 (license license:zlib))))
316 (define-public libjpeg
322 (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
325 "08kixcf3a7s9x91174abjnk1xbvj4v8crdc73zi4k9h3jfbm00k5"))))
326 (build-system gnu-build-system)
327 (synopsis "Library for handling JPEG files")
329 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
330 JPEG is a standardized compression method for full-color and gray-scale
332 It also includes programs that provide conversion between the JPEG format and
333 image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats, as well as
334 lossless JPEG manipulations such as rotation, scaling or cropping:
342 (license license:ijg)
343 (home-page "https://www.ijg.org/")))
345 (define-public libjpeg-8
346 (package (inherit libjpeg)
350 (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
353 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
355 (define-public libjxr
360 ;; We are using the Debian source because CodePlex does not
361 ;; deliver an easily downloadable tarball.
363 (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
364 version ".orig.tar.gz"))
367 "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
368 (patch-flags '("-p1" "--binary"))
369 (patches (search-patches "libjxr-fix-function-signature.patch"
370 "libjxr-fix-typos.patch"))))
371 (build-system gnu-build-system)
372 (arguments '(#:make-flags '("CC=gcc")
373 #:tests? #f ; no check target
375 (modify-phases %standard-phases
376 (delete 'configure) ; no configure script
377 ;; The upstream makefile does not include an install phase.
379 (lambda* (#:key outputs #:allow-other-keys)
380 (let* ((out (assoc-ref outputs "out"))
381 (bin (string-append out "/bin"))
382 (lib (string-append out "/lib"))
383 (include (string-append out "/include/jxrlib")))
384 (for-each (lambda (file)
385 (install-file file include)
388 '("jxrgluelib/JXRGlue.h"
389 "jxrgluelib/JXRMeta.h"
390 "jxrtestlib/JXRTest.h"
391 "image/sys/windowsmediaphoto.h")
392 (find-files "common/include" "\\.h$")))
393 (for-each (lambda (file)
394 (install-file file lib)
396 (find-files "." "\\.a$"))
397 (for-each (lambda (file)
398 (install-file file bin)
400 '("JxrDecApp" "JxrEncApp")))
402 (synopsis "Implementation of the JPEG XR standard")
403 (description "JPEG XR is an approved ISO/IEC International standard (its
404 official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
406 (license:non-copyleft
408 "See the header of the Makefile in the distribution."))
409 (home-page "https://jxrlib.codeplex.com/")))
411 (define-public jpegoptim
417 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
420 "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8"))))
421 (build-system gnu-build-system)
422 (inputs `(("libjpeg" ,libjpeg)))
424 '(#:tests? #f)) ; no tests
425 (synopsis "Optimize JPEG images")
427 "jpegoptim provides lossless optimization (based on optimizing
428 the Huffman tables) and \"lossy\" optimization based on setting
429 maximum quality factor.")
430 (license license:gpl2+)
431 (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim")))
433 (define-public libicns
440 "mirror://sourceforge/icns/"
441 "libicns-" version ".tar.gz"))
444 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
445 (build-system gnu-build-system)
450 `(#:tests? #t)) ; No tests.
451 (home-page "http://icns.sourceforge.net/")
452 (synopsis "Library for handling Mac OS icns resource files")
454 "Libicns is a library for the manipulation of Mac OS IconFamily resource
455 type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
456 convert between PNG and ICNS. @command{icns2png} will extract image files from
457 ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
458 with .desktop files. Additionally, @command{icontainer2png} is provided for
459 extracting icontainer icon files.")
460 (license (list license:lgpl2.1+ ; libicns
461 license:lgpl2.0+ ; src/apidocs.*
462 license:gpl2+)))) ; icns2png, png2icns, icontainer2png
464 (define-public libtiff
471 (uri (string-append "http://download.osgeo.org/libtiff/tiff-"
475 "1r4np635gr6zlc0bic38dzvxia6iqzcrary4n1ylarzpr8fd2lic"))))
476 (build-system gnu-build-system)
478 "doc")) ;1.3 MiB of HTML documentation
480 ;; Instead of using --docdir, this package has its own --with-docdir.
481 `(#:configure-flags (list (string-append "--with-docdir="
482 (assoc-ref %outputs "doc")
484 ,name "-" ,version))))
485 (inputs `(("zlib" ,zlib)
486 ("libjpeg" ,libjpeg)))
487 (synopsis "Library for handling TIFF files")
489 "Libtiff provides support for the Tag Image File Format (TIFF), a format
490 used for storing image data.
491 Included are a library, libtiff, for reading and writing TIFF and a small
492 collection of tools for doing simple manipulations of TIFF images.")
493 (license (license:non-copyleft "file://COPYRIGHT"
494 "See COPYRIGHT in the distribution."))
495 (home-page "http://www.simplesystems.org/libtiff/")))
497 (define-public leptonica
505 (url "https://github.com/DanBloomberg/leptonica.git")
507 (file-name (git-file-name name version))
509 (base32 "0sfg1ky0lghlq7xx0qii5167bim0wwfnnr83dl4skbj9awyvjiwi"))))
510 (build-system gnu-build-system)
512 `(("gnuplot" ,gnuplot) ;needed for test suite
513 ("autoconf" ,autoconf)
514 ("automake" ,automake)
516 ("pkg-config" ,pkg-config)))
522 ("libwebp" ,libwebp)))
524 ;; Linking a program with leptonica also requires these.
525 `(("openjpeg" ,openjpeg)
529 (modify-phases %standard-phases
530 (add-after 'unpack 'autogen
532 (invoke "sh" "autobuild")))
533 (add-after 'unpack 'patch-reg-wrapper
535 (substitute* "prog/reg_wrapper.sh"
537 (string-append " " (which "sh") " "))
541 (home-page "http://www.leptonica.com/")
542 (synopsis "Library and tools for image processing and analysis")
544 "Leptonica is a C library and set of command-line tools for efficient
545 image processing and image analysis operations. It supports rasterop, affine
546 transformations, binary and grayscale morphology, rank order, and convolution,
547 seedfill and connected components, image transformations combining changes in
548 scale and pixel depth, and pixelwise masking, blending, enhancement, and
550 (license license:bsd-2)))
552 (define-public jbig2dec
558 (uri (string-append "https://github.com/ArtifexSoftware"
559 "/ghostpdl-downloads/releases/download"
560 "/gs924/" name "-" version ".tar.gz"))
563 "0m1qwpbjbirgw2fqznbajdhdhh35d6xa2csr64lpjz735pvimykb"))
564 (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
565 (build-system gnu-build-system)
566 (arguments '(#:configure-flags '("--disable-static")))
567 (synopsis "Decoder of the JBIG2 image compression format")
569 "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
570 monochrome) images at moderately high resolution, and in particular scanned
571 paper documents. In this domain it is very efficient, offering compression
572 ratios on the order of 100:1.
574 This is a decoder only implementation, and currently is in the alpha
575 stage, meaning it doesn't completely work yet. However, it is
576 maintaining parity with available encoders, so it is useful for real
578 (home-page "https://jbig2dec.com")
579 (license license:gpl2+)))
581 (define-public openjpeg
585 (replacement openjpeg-2.3.1)
590 (string-append "https://github.com/uclouvain/openjpeg/archive/v"
592 (file-name (string-append name "-" version ".tar.gz"))
595 "06npqzkg20avnygdwaqpap91r7qpdqgrn39adj2bl8v0pg0qgirx"))))
596 (build-system cmake-build-system)
598 ;; Trying to run `$ make check' results in a no rule fault.
605 (synopsis "JPEG 2000 codec")
607 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
608 been developed in order to promote the use of JPEG 2000, the new
609 still-image compression standard from the Joint Photographic Experts
612 In addition to the basic codec, various other features are under
613 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
614 an indexing tool useful for the JPIP protocol, JPWL-tools for
615 error-resilience, a Java-viewer for j2k-images, ...")
616 (home-page "https://github.com/uclouvain/openjpeg")
617 (license license:bsd-2)))
619 (define-public openjpeg-2.3.1
626 (url "https://github.com/uclouvain/openjpeg")
627 (commit (string-append "v" version))))
628 (file-name (git-file-name "openjpeg" version))
631 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb"))))))
633 (define-public openjpeg-1
634 (package (inherit openjpeg)
641 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
642 name "-" version ".tar.gz"))
644 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
646 (define-public giflib
652 (uri (string-append "mirror://sourceforge/giflib/giflib-"
656 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))
657 (patches (search-patches
658 "giflib-make-reallocarray-private.patch"))))
659 (build-system gnu-build-system)
660 (outputs '("bin" ; utility programs
662 (inputs `(("libx11" ,libx11)
668 (modify-phases %standard-phases
669 (add-after 'unpack 'disable-html-doc-gen
671 (substitute* "doc/Makefile.in"
672 (("^all: allhtml manpages") ""))
674 (add-after 'install 'install-manpages
675 (lambda* (#:key outputs #:allow-other-keys)
676 (let* ((bin (assoc-ref outputs "bin"))
677 (man1dir (string-append bin "/share/man/man1")))
679 (for-each (lambda (file)
680 (let ((base (basename file)))
681 (format #t "installing `~a' to `~a'~%"
686 (find-files "doc" "\\.1"))
688 (synopsis "Tools and library for working with GIF images")
690 "GIFLIB is a library for reading and writing GIF images. It is API and
691 ABI compatible with libungif which was in wide use while the LZW compression
692 algorithm was patented. Tools are also included to convert, manipulate,
693 compose, and analyze GIF images.")
694 (home-page "http://giflib.sourceforge.net/")
695 (license license:x11)))
697 (define-public libungif
703 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
704 "libungif-" version "/libungif-"
708 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
709 (build-system gnu-build-system)
710 (inputs `(("perl" ,perl))) ;package ships some perl tools
711 (home-page "http://giflib.sourceforge.net/")
712 (synopsis "GIF decompression library")
714 "libungif is the old GIF decompression library by the GIFLIB project.")
715 (license license:expat)))
717 (define-public imlib2
724 "mirror://sourceforge/enlightenment/imlib2-src/" version
725 "/imlib2-" version ".tar.bz2"))
728 "1bms2iwmvnvpz5jqq3r52glarqkafif47zbh1ykz8hw85d2mfkps"))))
729 (build-system gnu-build-system)
731 `(("pkgconfig" ,pkg-config)))
735 ("freetype" ,freetype)
741 (home-page "https://sourceforge.net/projects/enlightenment/")
743 "Loading, saving, rendering and manipulating image files")
745 "Imlib2 is a library that does image file loading and saving as well as
746 rendering, manipulation, arbitrary polygon support, etc.
748 It does ALL of these operations FAST. Imlib2 also tries to be highly
749 intelligent about doing them, so writing naive programs can be done easily,
750 without sacrificing speed.
752 This is a complete rewrite over the Imlib 1.x series. The architecture is
753 more modular, simple, and flexible.")
754 (license license:imlib2)))
756 (define-public giblib
764 "http://linuxbrit.co.uk/downloads/giblib-"
767 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
768 "files/giblib/giblib-" version ".tar.gz")))
771 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
772 (build-system gnu-build-system)
776 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
777 (synopsis "Wrapper library for imlib2")
779 "Giblib is a simple library which wraps imlib2's context API, avoiding
780 all the context_get/set calls, adds fontstyles to the truetype renderer and
781 supplies a generic doubly-linked list and some string functions.")
782 ;; This license removes a clause about X Consortium from the original
784 (license (license:x11-style "file://COPYING"
785 "See 'COPYING' in the distribution."))))
787 (define-public freeimage
794 "mirror://sourceforge/freeimage/Source%20Distribution/"
796 (string-concatenate (string-split version #\.))
800 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"))
801 (modules '((guix build utils)))
806 (delete-file-recursively (string-append "Source/" dir)))
807 '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
809 "LibWebP" "OpenEXR" "ZLib"))))
810 (patches (search-patches "freeimage-unbundle.patch"
811 "freeimage-CVE-2015-0852.patch"
812 "freeimage-CVE-2016-5684.patch"
813 "freeimage-fix-build-with-gcc-5.patch"))))
814 (build-system gnu-build-system)
817 (modify-phases %standard-phases
818 ;; According to Fedora these files depend on private headers, but their
819 ;; presence is required for building, so we replace them with empty files.
820 (add-after 'unpack 'delete-unbuildable-files
822 (for-each (lambda (file)
824 (close (open file O_CREAT)))
825 '("Source/FreeImage/PluginG3.cpp"
826 "Source/FreeImageToolkit/JPEGTransform.cpp"))
828 ;; These scripts generate the Makefiles.
831 (invoke "sh" "gensrclist.sh")
832 (invoke "sh" "genfipsrclist.sh")))
833 (add-before 'build 'patch-makefile
834 (lambda* (#:key outputs #:allow-other-keys)
835 (substitute* "Makefile.gnu"
836 (("/usr") (assoc-ref outputs "out"))
837 (("-o root -g root") ""))
841 ;; We need '-fpermissive' for Source/FreeImage.h.
842 ;; libjxr doesn't have a pkg-config file.
843 (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive "
844 ;"-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib"
846 #:tests? #f)) ; no check target
848 `(("pkg-config" ,pkg-config)
851 `(("libjpeg" ,libjpeg)
858 ("openjpeg" ,openjpeg)
860 (synopsis "Library for handling popular graphics image formats")
862 "FreeImage is a library for developers who would like to support popular
863 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
864 (license license:gpl2+)
865 (home-page "http://freeimage.sourceforge.net")))
874 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
875 "Version-" (string-join (string-split version #\.) "-")
876 "/vigra-" version "-src.tar.gz"))
878 "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5"))))
879 (build-system cmake-build-system)
885 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
886 ; to create a configure-flag
891 ("python" ,python-2) ; print syntax
892 ("python2-numpy" ,python2-numpy)
895 `(("doxygen" ,doxygen)
896 ("python2-nose" ,python2-nose)
897 ("sphinx" ,python-sphinx)))
899 `(#:test-target "check"
901 (modify-phases %standard-phases
902 (add-after 'unpack 'disable-broken-tests
904 ;; See https://github.com/ukoethe/vigra/issues/432
905 (substitute* "test/fourier/CMakeLists.txt"
906 (("VIGRA_ADD_TEST.*") ""))
907 ;; This test fails with Numpy 1.15:
908 ;; <https://github.com/ukoethe/vigra/issues/436>.
909 (substitute* "vigranumpy/test/CMakeLists.txt"
913 (list "-Wno-dev" ; suppress developer mode with lots of warnings
914 (string-append "-DVIGRANUMPY_INSTALL_DIR="
915 (assoc-ref %outputs "out")
916 "/lib/python2.7/site-packages")
917 ;; OpenEXR is not enabled by default.
919 ;; Fix rounding error on 32-bit machines
920 "-DCMAKE_C_FLAGS=-ffloat-store"
921 ;; The header files of ilmbase are not found when included
922 ;; by the header files of openexr, and an explicit flag
924 (string-append "-DCMAKE_CXX_FLAGS=-I"
925 (assoc-ref %build-inputs "ilmbase")
928 (synopsis "Computer vision library")
930 "VIGRA stands for Vision with Generic Algorithms. It is an image
931 processing and analysis library that puts its main emphasis on customizable
932 algorithms and data structures. It is particularly strong for
933 multi-dimensional image processing.")
934 (license license:expat)
935 (home-page "https://ukoethe.github.io/vigra/")))
937 (define-public vigra-c
938 (let* ((commit "a2ff675f42079e2623318d8ff8b4288dbe7a7f06")
940 (version (git-version "0.0.0" revision commit)))
944 (home-page "https://github.com/BSeppke/vigra_c")
952 "1f1phmfbbz3dsq9330rd6bjmdg29hxskxi9l17cyx1f4mdqpgdgl"))
953 (file-name (git-file-name name version))))
954 (build-system cmake-build-system)
956 `(#:tests? #f)) ; No test target.
958 `(("doxygen" ,doxygen)))
963 (synopsis "C interface to the VIGRA computer vision library")
965 "This package provides a C interface to the VIGRA C++ computer vision
966 library. It is designed primarily to ease the implementation of higher-level
967 language bindings to VIGRA.")
968 (license license:expat))))
970 (define-public libwebp
976 ;; No tarballs are provided for >0.6.1.
979 (url "https://chromium.googlesource.com/webm/libwebp")
980 (commit (string-append "v" version))))
981 (file-name (git-file-name name version))
984 "1ay0sai7f74dyk2gi975qfllmq534vnsx456npf16583mqb6ib2q"))))
985 (build-system gnu-build-system)
987 `(("freeglut" ,freeglut)
991 ("libtiff" ,libtiff)))
993 `(("autoconf" ,autoconf)
994 ("automake" ,automake)
995 ("libtool" ,libtool)))
997 '(#:configure-flags '("--enable-libwebpmux"
998 "--enable-libwebpdemux"
999 "--enable-libwebpdecoder")
1000 #:phases (modify-phases %standard-phases
1001 (add-after 'unpack 'bootstrap
1003 (invoke "autoreconf" "-vif"))))))
1004 (home-page "https://developers.google.com/speed/webp/")
1005 (synopsis "Lossless and lossy image compression")
1007 "WebP is a new image format that provides lossless and lossy compression
1008 for images. WebP lossless images are 26% smaller in size compared to
1009 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
1010 equivalent SSIM index. WebP supports lossless transparency (also known as
1011 alpha channel) with just 22% additional bytes. Transparency is also supported
1012 with lossy compression and typically provides 3x smaller file sizes compared
1013 to PNG when lossy compression is acceptable for the red/green/blue color
1015 (license license:bsd-3)))
1017 (define-public libmng
1023 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
1024 version "/" name "-" version ".tar.xz"))
1027 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
1028 (build-system gnu-build-system)
1030 ;; These are all in the 'Libs.private' field of libmng.pc.
1032 ("libjpeg" ,libjpeg)
1034 (home-page "http://www.libmng.com/")
1035 (synopsis "Library for handling MNG files")
1037 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
1038 (license license:bsd-3)))
1040 (define-public exiv2
1046 (uri (list (string-append "https://www.exiv2.org/builds/exiv2-"
1047 version "-trunk.tar.gz")
1048 (string-append "https://www.exiv2.org/exiv2-"
1050 (string-append "https://fossies.org/linux/misc/exiv2-"
1051 version ".tar.gz")))
1052 (patches (search-patches "exiv2-CVE-2017-14860.patch"
1053 "exiv2-CVE-2017-14859-14862-14864.patch"))
1056 "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7"))))
1057 (build-system gnu-build-system)
1058 (arguments '(#:tests? #f)) ; no `check' target
1063 `(("intltool" ,intltool)))
1064 (home-page "https://www.exiv2.org/")
1065 (synopsis "Library and command-line utility to manage image metadata")
1067 "Exiv2 is a C++ library and a command line utility to manage image
1068 metadata. It provides fast and easy read and write access to the Exif, IPTC
1069 and XMP metadata of images in various formats.")
1071 ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
1072 ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
1073 ;; The core is GPLv2+:
1074 ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
1075 (license license:gpl2+)))
1077 (define-public devil
1083 (uri (string-append "http://downloads.sourceforge.net/openil/"
1084 "DevIL-" version ".tar.gz"))
1087 "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80"))))
1088 (build-system cmake-build-system)
1090 '(;; XXX: Not supported in the released CMakeLists.txt.
1091 ;; Enable this for > 1.8.0.
1094 (modify-phases %standard-phases
1095 (add-before 'configure 'change-directory
1096 (lambda _ (chdir "DevIL") #t)))))
1098 `(("pkg-config" ,pkg-config)))
1101 ("libjpeg" ,libjpeg-turbo)
1104 ("libtiff" ,libtiff)
1105 ("openexr" ,openexr)
1107 (synopsis "Library for manipulating many image formats")
1108 (description "Developer's Image Library (DevIL) is a library to develop
1109 applications with support for many types of images. DevIL can load, save,
1110 convert, manipulate, filter and display a wide variety of image formats.")
1111 (home-page "http://openil.sourceforge.net")
1112 (license license:lgpl2.1+)))
1114 (define-public jasper
1121 (url "https://github.com/mdadams/jasper.git")
1122 (commit (string-append "version-" version))))
1123 (file-name (git-file-name name version))
1126 "05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6"))))
1127 (build-system cmake-build-system)
1128 (inputs `(("libjpeg" ,libjpeg)))
1129 (synopsis "JPEG-2000 library")
1130 (description "The JasPer Project is an initiative to provide a reference
1131 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
1133 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
1134 (license (license:x11-style "file://LICENSE"))))
1144 (url "https://github.com/sekrit-twc/zimg.git")
1145 (commit (string-append "release-" version))))
1146 (file-name (git-file-name name version))
1149 "05krggiifbl6hyg2j3z8qz2k7si84g1qg9snhsnf1ml7mrhqhhlr"))))
1150 (build-system gnu-build-system)
1152 `(("autoconf" ,autoconf)
1153 ("automake" ,automake)
1154 ("libtool" ,libtool)))
1157 (modify-phases %standard-phases
1158 (add-after 'unpack 'autogen
1160 (invoke "sh" "autogen.sh"))))))
1161 (synopsis "Scaling, colorspace conversion, and dithering library")
1162 (description "Zimg implements the commonly required image processing basics
1163 of scaling, colorspace conversion, and depth conversion. A simple API enables
1164 conversion between any supported formats to operate with minimal knowledge from
1166 (home-page "https://github.com/sekrit-twc/zimg")
1167 ;; test/extra/ contains musl-libm,
1168 ;; which is MIT/expat licensed, but only used for tests
1169 (license license:wtfpl2)))
1171 (define-public perceptualdiff
1173 (name "perceptualdiff")
1179 (url "https://github.com/myint/perceptualdiff.git")
1180 (commit (string-append "v" version))))
1181 (file-name (git-file-name name version))
1183 (base32 "0yys55f9i9g3wjjg0j2m0p0k21zwnid8520a8lrr30khm4k5gibp"))))
1184 (build-system cmake-build-system)
1185 (inputs `(("freeimage" ,freeimage)))
1187 '(#:phases (modify-phases %standard-phases
1188 (add-after 'unpack 'fix-tests
1189 ;; cmake-build-system uses a build/ directory outside
1190 ;; of the source tree, one level higher than expected
1192 (substitute* "test/run_tests.bash"
1193 (("../build") "../../build"))
1195 (home-page "https://github.com/myint/perceptualdiff")
1196 (synopsis "Perceptual image comparison utility")
1197 (description "PerceptualDiff visually compares two images to determine
1198 whether they look alike. It uses a computational model of the human visual
1199 system to detect similarities. This allows it too see beyond irrelevant
1200 differences in file encoding, image quality, and other small variations.")
1201 (license license:gpl2+)))
1203 (define-public steghide
1209 (uri (string-append "mirror://sourceforge/steghide/steghide/"
1210 version "/steghide-" version ".tar.bz2"))
1213 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
1214 (patches (list (search-patch "steghide-fixes.patch")))))
1215 (build-system gnu-build-system)
1217 `(("gettext" ,gettext-minimal)
1218 ("libtool" ,libtool)
1219 ("perl" ,perl))) ;for tests
1221 `(("libmhash" ,libmhash)
1222 ("libmcrypt" ,libmcrypt)
1223 ("libjpeg" ,libjpeg)
1226 `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc
1228 #:phases (modify-phases %standard-phases
1229 (add-before 'configure 'set-perl-search-path
1231 ;; Work around "dotless @INC" build failure.
1233 (string-append (getcwd) "/tests:"
1234 (getenv "PERL5LIB")))
1236 (home-page "http://steghide.sourceforge.net")
1237 (synopsis "Image and audio steganography")
1239 "Steghide is a program to hide data in various kinds of image and audio
1240 files (known as @dfn{steganography}). Neither color nor sample frequencies are
1241 changed, making the embedding resistant against first-order statistical tests.")
1242 (license license:gpl2+)))
1244 (define-public stb-image-for-extempore
1245 (let ((revision "1")
1246 (commit "152a250a702bf28951bb0220d63bc0c99830c498"))
1248 (name "stb-image-for-extempore")
1249 (version (string-append "0-" revision "." (string-take commit 9)))
1251 (origin (method git-fetch)
1253 (url "https://github.com/extemporelang/stb.git")
1257 "0y0aa20pj9311x2ii06zg8xs34idg14hfgldqc5ymizc6cf1qiqv"))
1258 (file-name (string-append name "-" version "-checkout"))))
1259 (build-system cmake-build-system)
1260 (arguments `(#:tests? #f)) ; no tests included
1261 ;; Extempore refuses to build on architectures other than x86_64
1262 (supported-systems '("x86_64-linux"))
1263 (home-page "https://github.com/extemporelang/stb")
1264 (synopsis "Image library for Extempore")
1266 "This package is a collection of assorted single-file libraries. Of
1267 all included libraries only the image loading and decoding library is
1268 installed as @code{stb_image}.")
1269 (license license:public-domain))))
1271 (define-public optipng
1278 (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
1282 "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg"))
1283 (modules '((guix build utils)))
1286 (delete-file-recursively "src/libpng")
1287 (delete-file-recursively "src/zlib")
1289 (build-system gnu-build-system)
1291 `(("libpng" ,libpng)
1295 (modify-phases %standard-phases
1297 (lambda* (#:key outputs #:allow-other-keys)
1298 ;; configure script doesn't accept arguments CONFIG_SHELL and SHELL
1299 (invoke "sh" "configure"
1300 (string-append "--prefix=" (assoc-ref outputs "out"))
1301 "-with-system-libs")
1303 (synopsis "Optimizer that recompresses PNG image files to a smaller size")
1304 (description "OptiPNG is a PNG optimizer that recompresses image
1305 files to a smaller size, without losing any information. This program
1306 also converts external formats (BMP, GIF, PNM and TIFF) to optimized
1307 PNG, and performs PNG integrity checks and corrections.")
1308 (home-page "http://optipng.sourceforge.net/")
1309 (license license:zlib)))
1311 (define-public libjpeg-turbo
1313 (name "libjpeg-turbo")
1315 (replacement libjpeg-turbo-2.0.2)
1318 (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
1319 version "/libjpeg-turbo-" version ".tar.gz"))
1322 "1zv6z093l3x3jzygvni7b819j7xhn6d63jhcdrckj7fz67n6ry75"))))
1323 (build-system cmake-build-system)
1327 '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
1328 "-DENABLE_STATIC=0")))
1329 (home-page "https://libjpeg-turbo.org/")
1330 (synopsis "SIMD-accelerated JPEG image handling library")
1331 (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
1332 JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
1333 x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems,
1334 its highly-optimized Huffman coding routines allow it to outperform libjpeg by
1335 a significant amount.
1336 libjpeg-turbo implements both the traditional libjpeg API and the less powerful
1337 but more straightforward TurboJPEG API, and provides a full-featured Java
1338 interface. It supports color space extensions that allow it to compress from
1339 and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
1340 ;; libjpeg-turbo is covered by three different licenses; see LICENSE.md.
1341 (license (list license:bsd-3 ;the TurboJPEG API library and programs
1342 license:ijg ;the libjpeg library and associated tools
1343 license:zlib)))) ;the libjpeg-turbo SIMD extensions
1345 (define-public libjpeg-turbo-2.0.2
1347 (inherit libjpeg-turbo)
1350 (inherit (package-source libjpeg-turbo))
1351 (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
1352 version "/libjpeg-turbo-" version ".tar.gz"))
1355 "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c"))))))
1357 (define-public niftilib
1363 (uri (list (string-append "mirror://sourceforge/niftilib/"
1364 "nifticlib/nifticlib_"
1365 (string-join (string-split version #\.) "_")
1366 "/nifticlib-" version ".tar.gz")))
1368 (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
1369 (build-system gnu-build-system)
1371 '(#:tests? #f ; there is no test target
1372 #:parallel-build? #f ; not supported
1375 (string-append "ZLIB_INC="
1376 (assoc-ref %build-inputs "zlib") "/include")
1377 ;; Append "-fPIC" to CFLAGS.
1378 (string-append "CFLAGS="
1379 "-Wall -ansi -pedantic -fPIC"))
1381 (modify-phases %standard-phases
1383 (lambda* (#:key outputs #:allow-other-keys)
1384 (let ((out (assoc-ref outputs "out")))
1387 (copy-recursively dir (string-append out "/" dir)))
1388 '("bin" "lib" "include")))
1390 (delete 'configure))))
1393 (synopsis "Library for reading and writing files in the nifti-1 format")
1394 (description "Niftilib is a set of i/o libraries for reading and writing
1395 files in the nifti-1 data format - a binary file format for storing
1396 medical image data, e.g. magnetic resonance image (MRI) and functional MRI
1397 (fMRI) brain images.")
1398 (home-page "http://niftilib.sourceforge.net")
1399 (license license:public-domain)))
1401 (define-public gpick
1408 (url "https://github.com/thezbyg/gpick.git")
1409 (commit (string-append name "-" version))))
1410 (file-name (git-file-name name version))
1413 "0mcj806zagh122qgrdkrg0macpzby97y89xi2sjyn3bh8vmmyxjy"))))
1414 (build-system scons-build-system)
1417 ("gettext" ,gnu-gettext)
1418 ("pkg-config" ,pkg-config)))
1425 #:scons ,scons-python2
1426 #:scons-flags (list (string-append "DESTDIR=" %output))
1428 (modify-phases %standard-phases
1429 (add-before 'build 'fix-lua-reference
1431 (substitute* "SConscript"
1432 (("lua5.2") "lua-5.2"))
1434 (home-page "http://www.gpick.org/")
1435 (synopsis "Color picker")
1436 (description "Gpick is an advanced color picker and palette editing tool.")
1437 (license license:bsd-3)))
1439 (define-public libiptcdata
1441 (name "libiptcdata")
1445 (uri (string-append "https://github.com/ianw/libiptcdata"
1446 "/releases/download/release_"
1447 (string-join (string-split version #\.) "_")
1448 "/" name "-" version ".tar.gz"))
1451 "17m2bscc76r1bymjgb44fbbfrdsjfqyb2ivg9wchyllm8pgx1560"))))
1452 (build-system gnu-build-system)
1453 (home-page "https://github.com/ianw/libiptcdata")
1454 (synopsis "IPTC metadata manipulation library")
1456 "Libiptcdata is a C library for manipulating the International Press
1457 Telecommunications Council (@dfn{IPTC}) metadata stored within multimedia files
1458 such as images. This metadata can include captions and keywords, often used by
1459 popular photo management applications. The library provides routines for
1460 parsing, viewing, modifying, and saving this metadata.")
1461 (license license:lgpl2.0+)))
1463 (define-public flameshot
1471 (url "https://github.com/lupoDharkael/flameshot.git")
1472 (commit (string-append "v" version))))
1473 (file-name (git-file-name name version))
1476 "13h77np93r796jf289v4r687cmnpqkyqs34dm9gif4akaig74ky0"))))
1477 (build-system gnu-build-system)
1479 `(("qttools" ,qttools)))
1481 `(("qtbase" ,qtbase)))
1483 `(#:tests? #f ; no tests
1485 (modify-phases %standard-phases
1487 (lambda* (#:key outputs #:allow-other-keys)
1490 (string-append "BASEDIR=" (assoc-ref outputs "out"))
1492 (home-page "https://github.com/lupoDharkael/flameshot")
1493 (synopsis "Powerful yet simple to use screenshot software")
1494 (description "Flameshot is a screenshot program.
1498 @item Customizable appearance.
1500 @item In-app screenshot edition.
1501 @item DBus interface.
1502 @item Upload to Imgur.
1504 (license license:gpl3+)))
1506 (define-public r-jpeg
1513 (uri (cran-uri "jpeg" version))
1516 "05hawv5qcb82ljc1l2nchx1wah8mq2k2kfkhpzyww554ngzbwcnh"))))
1517 (build-system r-build-system)
1518 (inputs `(("libjpeg" ,libjpeg)))
1519 (home-page "http://www.rforge.net/jpeg/")
1520 (synopsis "Read and write JPEG images with R")
1521 (description "This package provides a way to read, write and display bitmap
1522 images stored in the JPEG format with R. It can read and write both files and
1523 in-memory raw vectors.")
1524 (license license:gpl2+)))
1526 (define-public gifsicle
1533 (uri (string-append "https://www.lcdf.org/gifsicle/gifsicle-"
1536 (base32 "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas"))))
1537 (build-system gnu-build-system)
1540 (modify-phases %standard-phases
1541 (add-before 'check 'patch-tests
1543 (substitute* "test/testie"
1551 (native-inputs `(("perl" ,perl))) ; only for tests
1552 (inputs `(("libx11" ,libx11)))
1553 (home-page "https://www.lcdf.org/gifsicle/")
1554 (synopsis "Edit GIF images and animations")
1555 (description "Gifsicle is a command-line GIF image manipulation tool that:
1558 @item Provides a batch mode for changing GIFs in place.
1559 @item Prints detailed information about GIFs, including comments.
1560 @item Control over interlacing, comments, looping, transparency, etc.
1561 @item Creates well-behaved GIFs: removes redundant colors, only uses local color
1563 @item Shrinks colormaps and change images to use the Web-safe palette.
1564 @item Optimizes GIF animations, or unoptimizes them for easier editing.
1567 Two other programs are included with Gifsicle: @command{gifview} is a
1568 lightweight animated-GIF viewer, and @command{gifdiff} compares two GIFs for
1569 identical visual appearance.")
1570 (license license:gpl2+)))
1580 (url "https://github.com/cslarsen/jp2a.git")
1581 (commit (string-append "v" version))))
1582 (file-name (git-file-name name version))
1585 "12a1z9ba2j16y67f41y8ax5sgv1wdjd71pg7circdxkj263n78ql"))))
1586 (build-system gnu-build-system)
1588 `(("libjpeg" ,libjpeg)
1591 `(("autoconf" ,autoconf)
1592 ("automake" ,automake)
1593 ("pkg-config" ,pkg-config)))
1594 (home-page "https://csl.name/jp2a/")
1595 (synopsis "Convert JPEG images to ASCII")
1597 "Jp2a is a small utility that converts JPEG images to ASCII.")
1598 (license license:gpl2)))
1608 (url "https://github.com/emersion/grim.git")
1609 (commit (string-append "v" version))))
1610 (file-name (git-file-name name version))
1612 (base32 "0brljl4zfbn5mh9hkfrfkvd27c5y9vdkgap9r1hrfy9r1x20sskn"))))
1613 (build-system meson-build-system)
1614 (native-inputs `(("pkg-config" ,pkg-config)))
1615 (inputs `(("cairo" ,cairo)
1616 ("libjpeg-turbo" ,libjpeg-turbo)
1618 ("wayland" ,wayland)
1619 ("wayland-protocols" ,wayland-protocols)))
1620 (home-page "https://github.com/emersion/grim")
1621 (synopsis "Create screenshots from a Wayland compositor")
1622 (description "grim can create screenshots from a Wayland compositor.")
1624 (license license:expat)))
1626 (define-public slurp
1634 (url "https://github.com/emersion/slurp.git")
1635 (commit (string-append "v" version))))
1636 (file-name (git-file-name name version))
1638 (base32 "0580m6kaiilgsrcj608r837r37sl6a25y7w21p7d6ij20fs3gvg1"))))
1639 (build-system meson-build-system)
1640 (native-inputs `(("pkg-config" ,pkg-config)))
1641 (inputs `(("cairo" ,cairo)
1643 ("wayland" ,wayland)
1644 ("wayland-protocols" ,wayland-protocols)))
1645 (home-page "https://github.com/emersion/slurp")
1646 (synopsis "Select a region in a Wayland compositor")
1647 (description "Slurp can select a region in a Wayland compositor and print it
1648 to the standard output. It works well together with grim.")
1650 (license license:expat)))