1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017, 2019 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, 2019 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, 2019 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,2019 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, 2019 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 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages ghostscript)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages graphics)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages lua)
61 #:use-module (gnu packages man)
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages mcrypt)
64 #:use-module (gnu packages mp3)
65 #:use-module (gnu packages ncurses)
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 scons)
84 #:use-module (srfi srfi-1))
92 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
93 version "/libpng-" version ".tar.xz")
95 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
96 "/libpng16/libpng-" version ".tar.xz")
98 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
99 "/libpng16/libpng-" version ".tar.xz")))
102 "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh"))))
103 (build-system gnu-build-system)
105 `(#:configure-flags '("--disable-static")))
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 ;; libpng-apng should be updated when the APNG patch is released:
118 ;; <https://bugs.gnu.org/27556>
119 (define-public libpng-apng
126 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
127 version "/libpng-" version ".tar.xz")
129 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
130 "/libpng16/libpng-" version ".tar.xz")
132 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
133 "/libpng16/libpng-" version ".tar.xz")))
136 "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq"))))
137 (build-system gnu-build-system)
139 `(#:modules ((guix build gnu-build-system)
143 (modify-phases %standard-phases
144 (add-after 'unpack 'patch-apng
145 (lambda* (#:key inputs #:allow-other-keys)
146 (define (apply-patch file)
147 (invoke "patch" "-p1" "--force"
149 (let ((apng.gz (assoc-ref inputs "apng")))
150 (format #t "Applying APNG patch '~a'...~%"
153 (string-append "gunzip < " apng.gz " > the-patch"))
154 (apply-patch "the-patch")
156 (add-before 'configure 'no-checks
158 (substitute* "Makefile.in"
159 (("^scripts/symbols.chk") "")
160 (("check: scripts/symbols.chk") ""))
166 (string-append "mirror://sourceforge/libpng-apng/libpng16/"
167 version "/libpng-" version "-apng.patch.gz"))
170 "0m5nv70n9903x3xzxw9qqc6sgf2rp106ha0x6gix0xf8wcrljaab"))))))
172 `(("libtool" ,libtool)))
173 ;; libpng.la says "-lz", so propagate it.
176 (synopsis "APNG patch for libpng")
178 "APNG (Animated Portable Network Graphics) is an unofficial
179 extension of the APNG (Portable Network Graphics) format.
180 APNG patch provides APNG support to libpng.")
181 (home-page "https://sourceforge.net/projects/libpng-apng/")
182 (license license:zlib)))
184 (define-public libpng-1.2
191 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
192 version "/libpng-" version ".tar.xz")
194 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
195 "/libpng12/libpng-" version ".tar.xz")
197 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
198 "/libpng12/libpng-" version ".tar.xz")))
201 "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl"))))))
203 (define-public pngcrush
209 (uri (string-append "mirror://sourceforge/pmt/pngcrush/"
210 version "/pngcrush-" version "-nolib.tar.xz"))
212 "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv"))))
213 (build-system gnu-build-system)
215 '(#:tests? #f ; no check target
217 (modify-phases %standard-phases
219 (lambda* (#:key inputs outputs #:allow-other-keys)
220 (substitute* "Makefile"
221 (("^(PNG(INC|LIB) = )/usr/local/" line vardef)
222 (string-append vardef (assoc-ref inputs "libpng") "/"))
223 (("^(Z(INC|LIB) = )/usr/local/" line vardef)
224 (string-append vardef (assoc-ref inputs "zlib") "/"))
225 ;; The Makefile is written by hand and not using $PREFIX
226 (("\\$\\(DESTDIR\\)/usr/")
227 (string-append (assoc-ref outputs "out") "/")))
232 (home-page "https://pmt.sourceforge.io/pngcrush")
233 (synopsis "Utility to compress PNG files")
234 (description "Pngcrush optimizes @acronym{PNG, Portable Network Graphics}
235 images. It can further losslessly compress them by as much as 40%.")
236 (license license:zlib)))
238 (define-public pngcrunch
239 ;; This package used to be wrongfully name "pngcrunch".
240 (deprecated-package "pngcrunch" pngcrush))
242 (define-public pnglite
243 (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
247 ;; The project was moved from sourceforge to github.
248 ;; The latest version in sourceforge was 0.1.17:
249 ;; https://sourceforge.net/projects/pnglite/files/pnglite/
250 ;; No releases are made in github.
251 (version (git-version "0.1.17" revision commit))
255 (url "https://github.com/dankar/pnglite")
259 "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby"))
260 (file-name (git-file-name name version))))
261 (build-system gnu-build-system)
263 `(#:tests? #f ; no tests
265 (modify-phases %standard-phases
269 ;; common build flags for building shared libraries
270 (let ((cflags '("-O2" "-g" "-fPIC"))
271 (ldflags '("-shared")))
280 (lambda* (#:key outputs #:allow-other-keys)
281 (let* ((out (assoc-ref outputs "out"))
282 (lib (string-append out "/lib/"))
283 (include (string-append out "/include/"))
284 (doc (string-append out "/share/doc/"
285 ,name "-" ,version "/")))
286 (install-file "libpnglite.so" lib)
287 (install-file "pnglite.h" include)
288 (install-file "README.md" doc)
290 (inputs `(("zlib" ,zlib)))
291 (home-page "https://github.com/dankar/pnglite")
292 (synopsis "Pretty small png library")
293 (description "A pretty small png library.
294 Currently all documentation resides in @file{pnglite.h}.")
295 (license license:zlib))))
297 (define-public libimagequant
299 (name "libimagequant")
305 (url "https://github.com/ImageOptim/libimagequant.git")
307 (file-name (git-file-name name version))
309 (base32 "0cp68w04ja5pv77ssfafsn958w9hh9zb8crrlb5j3gsrcmdc032k"))))
310 (build-system gnu-build-system)
312 '(#:tests? #f)) ; no check target
313 (home-page "https://pngquant.org/lib/")
314 (synopsis "Image palette quantization library")
315 (description "libimagequant is a small, portable C library for
316 high-quality conversion of RGBA images to 8-bit indexed-color (palette)
317 images. This library can significantly reduces file sizes and powers pngquant
318 and other PNG optimizers.")
319 (license license:gpl3+)))
321 (define-public pngquant
329 (url "https://github.com/kornelski/pngquant.git")
331 (file-name (git-file-name name version))
333 (base32 "1yiwbcihn4311fpfd568gg8zmmhqwg80jmhbhkb5msiipgd9xv33"))))
334 (build-system gnu-build-system)
336 `(#:test-target "test"
338 '("--with-openmp" "--with-lcms2")))
340 `(("pkg-config" ,pkg-config)))
345 ("libimagequant" ,libimagequant)))
346 (home-page "https://pngquant.org/")
347 (synopsis "Utility and library for lossy compressing PNG images")
348 (description "pngquant is a PNG compressor that significantly reduces file
349 sizes by converting images to a more efficient 8-bit PNG format with alpha
350 channel (often 60-80% smaller than 24/32-bit PNG files). Compressed images
351 are fully standards-compliant and are supported by all web browsers and
356 @item High-quality palette generation using a combination of vector
357 quantization algorithms.
358 @item Unique adaptive dithering algorithm that adds less noise to images
359 than the standard Floyd-Steinberg.
360 @item Easy to integrate with shell scripts, GUIs and server-side software.
361 @item Fast mode for real-time processing/large numbers of images.
363 (license license:gpl3+)))
365 (define-public libjpeg
371 (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
374 "08kixcf3a7s9x91174abjnk1xbvj4v8crdc73zi4k9h3jfbm00k5"))))
375 (build-system gnu-build-system)
376 (synopsis "Library for handling JPEG files")
378 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
379 JPEG is a standardized compression method for full-color and gray-scale
381 It also includes programs that provide conversion between the JPEG format and
382 image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats, as well as
383 lossless JPEG manipulations such as rotation, scaling or cropping:
391 (license license:ijg)
392 (home-page "https://www.ijg.org/")))
394 (define-public libjpeg-8
395 (package (inherit libjpeg)
399 (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
402 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
404 (define-public libjxr
409 ;; We are using the Debian source because CodePlex does not
410 ;; deliver an easily downloadable tarball.
412 (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
413 version ".orig.tar.gz"))
416 "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
417 (patch-flags '("-p1" "--binary"))
418 (patches (search-patches "libjxr-fix-function-signature.patch"
419 "libjxr-fix-typos.patch"))))
420 (build-system gnu-build-system)
424 ;; A substitute* procedure call would be enough to add the -fPIC
425 ;; flag if there was no file decoding error.
426 ;; The makefile is a "Non-ISO extended-ASCII text, with CRLF line
427 ;; terminators" according to the file(1) utility.
428 (string-append "CFLAGS=-I. -Icommon/include -Iimage/sys -fPIC "
429 "-D__ANSI__ -DDISABLE_PERF_MEASUREMENT -w -O "))
430 #:tests? #f ; no check target
432 (modify-phases %standard-phases
433 (delete 'configure) ; no configure script
434 (add-after 'build 'build-shared-library
436 ;; The Makefile uses optimization level 1, so the same
437 ;; level is used here for consistency.
438 (invoke "gcc" "-shared" "-fPIC" "-O"
440 "adapthuff.o" "image.o" "strcodec.o" "strPredQuant.o"
441 "strTransform.o" "perfTimerANSI.o"
443 "decode.o" "postprocess.o" "segdec.o" "strdec.o"
444 "strInvTransform.o" "strPredQuantDec.o" "JXRTranscode.o"
446 "encode.o" "segenc.o" "strenc.o" "strFwdTransform.o"
449 (invoke "gcc" "-shared" "-fPIC" "-O"
451 "JXRGlue.o" "JXRMeta.o" "JXRGluePFC.o" "JXRGlueJxr.o"
453 "JXRTest.o" "JXRTestBmp.o" "JXRTestHdr.o" "JXRTestPnm.o"
454 "JXRTestTif.o" "JXRTestYUV.o"
455 "-o" "libjxrglue.so")))
456 ;; The upstream makefile does not include an install phase.
458 (lambda* (#:key outputs #:allow-other-keys)
459 (let* ((out (assoc-ref outputs "out"))
460 (bin (string-append out "/bin"))
461 (lib (string-append out "/lib"))
462 (include (string-append out "/include/jxrlib")))
463 (for-each (lambda (file)
464 (install-file file include)
467 '("jxrgluelib/JXRGlue.h"
468 "jxrgluelib/JXRMeta.h"
469 "jxrtestlib/JXRTest.h"
470 "image/sys/windowsmediaphoto.h")
471 (find-files "common/include" "\\.h$")))
472 (for-each (lambda (file)
473 (install-file file lib)
475 (find-files "." "\\.(a|so)$"))
476 (for-each (lambda (file)
477 (install-file file bin)
479 '("JxrDecApp" "JxrEncApp")))
481 (synopsis "Implementation of the JPEG XR standard")
482 (description "JPEG XR is an approved ISO/IEC International standard (its
483 official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
485 (license:non-copyleft
487 "See the header of the Makefile in the distribution."))
488 (home-page "https://jxrlib.codeplex.com/")))
490 (define-public jpegoptim
496 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
499 "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8"))))
500 (build-system gnu-build-system)
501 (inputs `(("libjpeg" ,libjpeg)))
503 '(#:tests? #f)) ; no tests
504 (synopsis "Optimize JPEG images")
506 "jpegoptim provides lossless optimization (based on optimizing
507 the Huffman tables) and \"lossy\" optimization based on setting
508 maximum quality factor.")
509 (license license:gpl2+)
510 (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim")))
512 (define-public libicns
519 "mirror://sourceforge/icns/"
520 "libicns-" version ".tar.gz"))
523 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
524 (build-system gnu-build-system)
529 `(#:tests? #t)) ; No tests.
530 (home-page "http://icns.sourceforge.net/")
531 (synopsis "Library for handling Mac OS icns resource files")
533 "Libicns is a library for the manipulation of Mac OS IconFamily resource
534 type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
535 convert between PNG and ICNS. @command{icns2png} will extract image files from
536 ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
537 with .desktop files. Additionally, @command{icontainer2png} is provided for
538 extracting icontainer icon files.")
539 (license (list license:lgpl2.1+ ; libicns
540 license:lgpl2.0+ ; src/apidocs.*
541 license:gpl2+)))) ; icns2png, png2icns, icontainer2png
543 (define-public libtiff
550 (uri (string-append "http://download.osgeo.org/libtiff/tiff-"
554 "1r4np635gr6zlc0bic38dzvxia6iqzcrary4n1ylarzpr8fd2lic"))))
555 (build-system gnu-build-system)
557 "doc")) ;1.3 MiB of HTML documentation
559 ;; Instead of using --docdir, this package has its own --with-docdir.
560 `(#:configure-flags (list (string-append "--with-docdir="
561 (assoc-ref %outputs "doc")
563 ,name "-" ,version))))
564 (inputs `(("zlib" ,zlib)
565 ("libjpeg" ,libjpeg)))
566 (synopsis "Library for handling TIFF files")
568 "Libtiff provides support for the Tag Image File Format (TIFF), a format
569 used for storing image data.
570 Included are a library, libtiff, for reading and writing TIFF and a small
571 collection of tools for doing simple manipulations of TIFF images.")
572 (license (license:non-copyleft "file://COPYRIGHT"
573 "See COPYRIGHT in the distribution."))
574 (home-page "http://www.simplesystems.org/libtiff/")))
576 (define-public leptonica
584 (url "https://github.com/DanBloomberg/leptonica.git")
586 (file-name (git-file-name name version))
588 (base32 "0sfg1ky0lghlq7xx0qii5167bim0wwfnnr83dl4skbj9awyvjiwi"))))
589 (build-system gnu-build-system)
591 `(("gnuplot" ,gnuplot) ;needed for test suite
592 ("autoconf" ,autoconf)
593 ("automake" ,automake)
595 ("pkg-config" ,pkg-config)))
601 ("libwebp" ,libwebp)))
603 ;; Linking a program with leptonica also requires these.
604 `(("openjpeg" ,openjpeg)
608 (modify-phases %standard-phases
609 (add-after 'unpack 'patch-reg-wrapper
611 (substitute* "prog/reg_wrapper.sh"
613 (string-append " " (which "sh") " "))
617 (home-page "http://www.leptonica.com/")
618 (synopsis "Library and tools for image processing and analysis")
620 "Leptonica is a C library and set of command-line tools for efficient
621 image processing and image analysis operations. It supports rasterop, affine
622 transformations, binary and grayscale morphology, rank order, and convolution,
623 seedfill and connected components, image transformations combining changes in
624 scale and pixel depth, and pixelwise masking, blending, enhancement, and
626 (license license:bsd-2)))
628 (define-public jbig2dec
634 (uri (string-append "https://github.com/ArtifexSoftware"
635 "/ghostpdl-downloads/releases/download"
636 "/gs927/" name "-" version ".tar.gz"))
639 "00h61y7bh3z6mqfzxyb318gyh0f8jwarg4hvlrm83rqps8avzxm4"))
640 (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
641 (build-system gnu-build-system)
642 (arguments '(#:configure-flags '("--disable-static")))
643 (synopsis "Decoder of the JBIG2 image compression format")
645 "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
646 monochrome) images at moderately high resolution, and in particular scanned
647 paper documents. In this domain it is very efficient, offering compression
648 ratios on the order of 100:1.
650 This is a decoder only implementation, and currently is in the alpha
651 stage, meaning it doesn't completely work yet. However, it is
652 maintaining parity with available encoders, so it is useful for real
654 (home-page "https://jbig2dec.com")
655 (license license:gpl2+)))
657 (define-public jbigkit
664 (uri (string-append "https://www.cl.cam.ac.uk/~mgk25/jbigkit/"
665 "download/jbigkit-" version ".tar.gz"))
667 (base32 "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy"))
668 (modules '((guix build utils)))
671 ;; Remove files without clear licence information.
672 (for-each delete-file-recursively
673 (list "contrib" "examples"))
675 (build-system gnu-build-system)
676 (outputs (list "out" "pbmtools"))
678 `(#:modules ((srfi srfi-26)
679 ,@%gnu-build-system-modules)
681 (modify-phases %standard-phases
682 (delete 'configure) ; no configure script
683 (replace 'install ; no ‘make install’ target
684 (lambda* (#:key outputs #:allow-other-keys)
685 (let* ((out (assoc-ref outputs "out"))
686 (lib (string-append out "/lib"))
687 (include (string-append out "/include")))
688 (with-directory-excursion "libjbig"
689 (for-each (cut install-file <> include)
690 (find-files "." "\\.h$"))
691 (for-each (cut install-file <> lib)
692 (find-files "." "\\.a$")))
694 (add-after 'install 'install-pbmtools
695 (lambda* (#:key outputs #:allow-other-keys)
696 (let* ((out (assoc-ref outputs "pbmtools"))
697 (bin (string-append out "/bin"))
698 (man1 (string-append out "/share/man/man1"))
699 (man5 (string-append out "/share/man/man5")))
700 (with-directory-excursion "pbmtools"
701 (for-each (cut install-file <> bin)
702 (list "jbgtopbm" "jbgtopbm85"
703 "pbmtojbg" "pbmtojbg85"))
705 (for-each (cut install-file <> man1)
706 (find-files "." "\\.1$"))
707 (for-each (cut install-file <> man5)
708 (find-files "." "\\.5$"))
711 #:tests? #f)) ; tests depend on examples/
712 (home-page "https://www.cl.cam.ac.uk/~mgk25/jbigkit/")
713 (synopsis "Lossless compression for bi-level high-resolution images")
715 "JBIG-KIT implements the JBIG1 data compression standard (ITU-T T.82 and
716 ISO/IEC 11544:1993), designed for bi-level (one bit per pixel) images such as
717 black-and-white scanned documents. It is widely used in fax products, printer
718 firmware and drivers, document management systems, and imaging software.
720 This package provides a static C library of (de)compression functions and some
721 simple command-line converters similar to those provided by netpbm.
723 Two JBIG1 variants are available. One (@file{jbig.c}) implements nearly all
724 options of the standard but has to keep the full uncompressed image in memory.
725 The other (@file{jbig85.c}) implements just the ITU-T T.85 profile, with
726 memory management optimized for embedded and fax applications. It buffers
727 only a few lines of the uncompressed image in memory and is able to stream
728 images of initially unknown height.")
729 (license (list license:isc ; pbmtools/p?m.5
730 license:gpl2+)))) ; the rest
732 (define-public openjpeg
739 (url "https://github.com/uclouvain/openjpeg")
740 (commit (string-append "v" version))))
741 (file-name (git-file-name "openjpeg" version))
744 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb"))))
745 (build-system cmake-build-system)
747 '(#:tests? #f ;TODO: requires a 1.1 GiB data repository
748 #:configure-flags '("-DBUILD_STATIC_LIBS=OFF")))
754 (synopsis "JPEG 2000 codec")
756 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
757 been developed in order to promote the use of JPEG 2000, the new
758 still-image compression standard from the Joint Photographic Experts
761 In addition to the basic codec, various other features are under
762 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
763 an indexing tool useful for the JPIP protocol, JPWL-tools for
764 error-resilience, a Java-viewer for j2k-images, ...")
765 (home-page "https://github.com/uclouvain/openjpeg")
766 (license license:bsd-2)))
768 (define-public openjpeg-1
769 (package (inherit openjpeg)
776 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
777 name "-" version ".tar.gz"))
779 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
781 (define-public giflib
787 (uri (string-append "mirror://sourceforge/giflib/giflib-"
791 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))
792 (patches (search-patches
793 "giflib-make-reallocarray-private.patch"))))
794 (build-system gnu-build-system)
795 (outputs '("bin" ; utility programs
797 (inputs `(("libx11" ,libx11)
803 (modify-phases %standard-phases
804 (add-after 'unpack 'disable-html-doc-gen
806 (substitute* "doc/Makefile.in"
807 (("^all: allhtml manpages") ""))
809 (add-after 'install 'install-manpages
810 (lambda* (#:key outputs #:allow-other-keys)
811 (let* ((bin (assoc-ref outputs "bin"))
812 (man1dir (string-append bin "/share/man/man1")))
814 (for-each (lambda (file)
815 (let ((base (basename file)))
816 (format #t "installing `~a' to `~a'~%"
821 (find-files "doc" "\\.1"))
823 (synopsis "Tools and library for working with GIF images")
825 "GIFLIB is a library for reading and writing GIF images. It is API and
826 ABI compatible with libungif which was in wide use while the LZW compression
827 algorithm was patented. Tools are also included to convert, manipulate,
828 compose, and analyze GIF images.")
829 (home-page "http://giflib.sourceforge.net/")
830 (license license:x11)))
832 (define-public libungif
838 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
839 "libungif-" version "/libungif-"
843 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
844 (build-system gnu-build-system)
845 (inputs `(("perl" ,perl))) ;package ships some perl tools
846 (home-page "http://giflib.sourceforge.net/")
847 (synopsis "GIF decompression library")
849 "libungif is the old GIF decompression library by the GIFLIB project.")
850 (license license:expat)))
852 (define-public imlib2
859 "mirror://sourceforge/enlightenment/imlib2-src/" version
860 "/imlib2-" version ".tar.bz2"))
863 "0v8n3dswx7rxqfd0q03xwc7j2w1mv8lv18rdxv487a1xw5vklfad"))))
864 (build-system gnu-build-system)
866 `(("pkgconfig" ,pkg-config)))
869 ("freetype" ,freetype)
871 ("libid3tag" ,libid3tag)
877 ("libwebp" ,libwebp)))
878 (home-page "https://sourceforge.net/projects/enlightenment/")
880 "Loading, saving, rendering and manipulating image files")
882 "Imlib2 is a library that does image file loading and saving as well as
883 rendering, manipulation, arbitrary polygon support, etc.
885 It does ALL of these operations FAST. Imlib2 also tries to be highly
886 intelligent about doing them, so writing naive programs can be done easily,
887 without sacrificing speed.
889 This is a complete rewrite over the Imlib 1.x series. The architecture is
890 more modular, simple, and flexible.")
891 (license license:imlib2)))
893 (define-public giblib
901 "http://linuxbrit.co.uk/downloads/giblib-"
904 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
905 "files/giblib/giblib-" version ".tar.gz")))
908 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
909 (build-system gnu-build-system)
913 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
914 (synopsis "Wrapper library for imlib2")
916 "Giblib is a simple library which wraps imlib2's context API, avoiding
917 all the context_get/set calls, adds fontstyles to the truetype renderer and
918 supplies a generic doubly-linked list and some string functions.")
919 ;; This license removes a clause about X Consortium from the original
921 (license (license:x11-style "file://COPYING"
922 "See 'COPYING' in the distribution."))))
924 (define-public freeimage
931 "mirror://sourceforge/freeimage/Source%20Distribution/"
933 (string-concatenate (string-split version #\.))
937 "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl"))
938 (modules '((guix build utils)))
943 (delete-file-recursively (string-append "Source/" dir)))
944 '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
945 "LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
946 (patches (search-patches "freeimage-unbundle.patch"))))
947 (build-system gnu-build-system)
950 (modify-phases %standard-phases
951 ;; According to Fedora these files depend on private headers, but their
952 ;; presence is required for building, so we replace them with empty files.
953 (add-after 'unpack 'delete-unbuildable-files
955 (for-each (lambda (file)
957 (close (open file O_CREAT)))
958 '("Source/FreeImage/PluginG3.cpp"
959 "Source/FreeImageToolkit/JPEGTransform.cpp"))
961 ;; These scripts generate the Makefiles.
964 (invoke "sh" "gensrclist.sh")
965 (invoke "sh" "genfipsrclist.sh")))
966 (add-before 'build 'patch-makefile
967 (lambda* (#:key outputs #:allow-other-keys)
968 (substitute* "Makefile.gnu"
969 (("/usr") (assoc-ref outputs "out"))
970 (("-o root -g root") ""))
974 ;; We need '-fpermissive' for Source/FreeImage.h.
975 ;; libjxr doesn't have a pkg-config file.
976 (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive "
977 "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib"))
978 #:tests? #f)) ; no check target
980 `(("pkg-config" ,pkg-config)
983 `(("libjpeg" ,libjpeg)
990 ("openjpeg" ,openjpeg)
992 (synopsis "Library for handling popular graphics image formats")
994 "FreeImage is a library for developers who would like to support popular
995 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
996 (license license:gpl2+)
997 (home-page "http://freeimage.sourceforge.net")))
1006 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
1007 "Version-" (string-join (string-split version #\.) "-")
1008 "/vigra-" version "-src.tar.gz"))
1010 "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5"))))
1011 (build-system cmake-build-system)
1017 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
1018 ; to create a configure-flag
1019 ("libjpeg" ,libjpeg)
1021 ("libtiff" ,libtiff)
1022 ("openexr" ,openexr)
1023 ("python" ,python-2) ; print syntax
1024 ("python2-numpy" ,python2-numpy)
1027 `(("doxygen" ,doxygen)
1028 ("python2-nose" ,python2-nose)
1029 ("sphinx" ,python-sphinx)))
1031 `(#:test-target "check"
1033 (modify-phases %standard-phases
1034 (add-after 'unpack 'disable-broken-tests
1036 ;; See https://github.com/ukoethe/vigra/issues/432
1037 (substitute* "test/fourier/CMakeLists.txt"
1038 (("VIGRA_ADD_TEST.*") ""))
1039 ;; This test fails with Numpy 1.15:
1040 ;; <https://github.com/ukoethe/vigra/issues/436>.
1041 (substitute* "vigranumpy/test/CMakeLists.txt"
1042 (("test1\\.py") ""))
1045 (list "-Wno-dev" ; suppress developer mode with lots of warnings
1046 (string-append "-DVIGRANUMPY_INSTALL_DIR="
1047 (assoc-ref %outputs "out")
1048 "/lib/python2.7/site-packages")
1049 ;; OpenEXR is not enabled by default.
1051 ;; Fix rounding error on 32-bit machines
1052 "-DCMAKE_C_FLAGS=-ffloat-store"
1053 ;; The header files of ilmbase are not found when included
1054 ;; by the header files of openexr, and an explicit flag
1056 (string-append "-DCMAKE_CXX_FLAGS=-I"
1057 (assoc-ref %build-inputs "ilmbase")
1059 " -ffloat-store"))))
1060 (synopsis "Computer vision library")
1062 "VIGRA stands for Vision with Generic Algorithms. It is an image
1063 processing and analysis library that puts its main emphasis on customizable
1064 algorithms and data structures. It is particularly strong for
1065 multi-dimensional image processing.")
1066 (license license:expat)
1067 (home-page "https://ukoethe.github.io/vigra/")))
1069 (define-public vigra-c
1070 (let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7")
1074 (version (git-version "0.0.0" revision commit))
1075 (home-page "https://github.com/BSeppke/vigra_c")
1083 "1pnd92s284dvsg8zp6md7p8ck55bmcsryz58gzic7jh6m72hg689"))
1084 (file-name (git-file-name name version))))
1085 (build-system cmake-build-system)
1087 `(#:tests? #f)) ; No test target.
1089 `(("doxygen" ,doxygen)))
1095 (synopsis "C interface to the VIGRA computer vision library")
1097 "This package provides a C interface to the VIGRA C++ computer vision
1098 library. It is designed primarily to ease the implementation of higher-level
1099 language bindings to VIGRA.")
1100 (license license:expat))))
1102 (define-public libwebp
1108 ;; No tarballs are provided for >0.6.1.
1111 (url "https://chromium.googlesource.com/webm/libwebp")
1112 (commit (string-append "v" version))))
1113 (file-name (git-file-name name version))
1116 "1l8h9d3z3kla567ilmymrgg8vc2n763g8qss1hah8dg832hbqkxf"))))
1117 (build-system gnu-build-system)
1119 `(("freeglut" ,freeglut)
1121 ("libjpeg" ,libjpeg)
1123 ("libtiff" ,libtiff)))
1125 `(("autoconf" ,autoconf)
1126 ("automake" ,automake)
1127 ("libtool" ,libtool)))
1129 '(#:configure-flags '("--enable-libwebpmux"
1130 "--enable-libwebpdemux"
1131 "--enable-libwebpdecoder")))
1132 (home-page "https://developers.google.com/speed/webp/")
1133 (synopsis "Lossless and lossy image compression")
1135 "WebP is a new image format that provides lossless and lossy compression
1136 for images. WebP lossless images are 26% smaller in size compared to
1137 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
1138 equivalent SSIM index. WebP supports lossless transparency (also known as
1139 alpha channel) with just 22% additional bytes. Transparency is also supported
1140 with lossy compression and typically provides 3x smaller file sizes compared
1141 to PNG when lossy compression is acceptable for the red/green/blue color
1143 (license license:bsd-3)))
1145 (define-public libmng
1151 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
1152 version "/" name "-" version ".tar.xz"))
1155 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
1156 (build-system gnu-build-system)
1158 ;; These are all in the 'Libs.private' field of libmng.pc.
1160 ("libjpeg" ,libjpeg)
1162 (home-page "http://www.libmng.com/")
1163 (synopsis "Library for handling MNG files")
1165 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
1166 (license license:bsd-3)))
1168 (define-public exiv2
1175 (uri (string-append "https://www.exiv2.org/builds/exiv2-" version
1178 (base32 "0gqminvj14xm3rgbnydbywf22608js80rp7nmxxk4497j5mzali6"))))
1179 (build-system cmake-build-system)
1180 (arguments '(#:tests? #f)) ; no test suite
1184 (home-page "https://www.exiv2.org/")
1185 (synopsis "Library and command-line utility to manage image metadata")
1187 "Exiv2 is a C++ library and a command line utility to manage image
1188 metadata. It provides fast and easy read and write access to the Exif, IPTC
1189 and XMP metadata of images in various formats.")
1191 ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
1192 ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
1193 ;; The core is GPLv2+:
1194 ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
1195 (license license:gpl2+)))
1197 (define-public exiv2-0.26
1203 (uri (list (string-append "https://www.exiv2.org/builds/exiv2-"
1204 version "-trunk.tar.gz")
1205 (string-append "https://www.exiv2.org/exiv2-"
1207 (string-append "https://fossies.org/linux/misc/exiv2-"
1208 version ".tar.gz")))
1209 (patches (search-patches "exiv2-CVE-2017-14860.patch"
1210 "exiv2-CVE-2017-14859-14862-14864.patch"))
1213 "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7"))))
1214 (build-system gnu-build-system)
1215 (arguments '(#:tests? #f)) ; no `check' target
1220 `(("intltool" ,intltool)))
1222 ;; People should rely on the newer version, so don't expose it.
1223 (properties `((hidden? . #t)))))
1225 (define-public devil
1231 (uri (string-append "http://downloads.sourceforge.net/openil/"
1232 "DevIL-" version ".tar.gz"))
1235 "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80"))))
1236 (build-system cmake-build-system)
1238 '(;; XXX: Not supported in the released CMakeLists.txt.
1239 ;; Enable this for > 1.8.0.
1242 (modify-phases %standard-phases
1243 (add-before 'configure 'change-directory
1244 (lambda _ (chdir "DevIL") #t)))))
1246 `(("pkg-config" ,pkg-config)))
1249 ("libjpeg" ,libjpeg-turbo)
1252 ("libtiff" ,libtiff)
1253 ("openexr" ,openexr)
1255 (synopsis "Library for manipulating many image formats")
1256 (description "Developer's Image Library (DevIL) is a library to develop
1257 applications with support for many types of images. DevIL can load, save,
1258 convert, manipulate, filter and display a wide variety of image formats.")
1259 (home-page "http://openil.sourceforge.net")
1260 (license license:lgpl2.1+)))
1262 (define-public jasper
1269 (url "https://github.com/mdadams/jasper.git")
1270 (commit (string-append "version-" version))))
1271 (file-name (git-file-name name version))
1274 "05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6"))))
1275 (build-system cmake-build-system)
1276 (inputs `(("libjpeg" ,libjpeg)))
1277 (synopsis "JPEG-2000 library")
1278 (description "The JasPer Project is an initiative to provide a reference
1279 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
1281 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
1282 (license (license:x11-style "file://LICENSE"))))
1292 (url "https://github.com/sekrit-twc/zimg.git")
1293 (commit (string-append "release-" version))))
1294 (file-name (git-file-name name version))
1296 (base32 "0jlgrlfs9maixd8mx7gk2kfawz8ixnihkxi7vhyzfy1gq49vmxm2"))))
1297 (build-system gnu-build-system)
1299 `(("autoconf" ,autoconf)
1300 ("automake" ,automake)
1301 ("libtool" ,libtool)))
1302 (synopsis "Scaling, colorspace conversion, and dithering library")
1303 (description "Zimg implements the commonly required image processing basics
1304 of scaling, colorspace conversion, and depth conversion. A simple API enables
1305 conversion between any supported formats to operate with minimal knowledge from
1307 (home-page "https://github.com/sekrit-twc/zimg")
1308 ;; test/extra/ contains musl-libm,
1309 ;; which is MIT/expat licensed, but only used for tests
1310 (license license:wtfpl2)))
1312 (define-public perceptualdiff
1314 (name "perceptualdiff")
1320 (url "https://github.com/myint/perceptualdiff.git")
1321 (commit (string-append "v" version))))
1322 (file-name (git-file-name name version))
1324 (base32 "0yys55f9i9g3wjjg0j2m0p0k21zwnid8520a8lrr30khm4k5gibp"))))
1325 (build-system cmake-build-system)
1326 (inputs `(("freeimage" ,freeimage)))
1328 '(#:phases (modify-phases %standard-phases
1329 (add-after 'unpack 'fix-tests
1330 ;; cmake-build-system uses a build/ directory outside
1331 ;; of the source tree, one level higher than expected
1333 (substitute* "test/run_tests.bash"
1334 (("../build") "../../build"))
1336 (home-page "https://github.com/myint/perceptualdiff")
1337 (synopsis "Perceptual image comparison utility")
1338 (description "PerceptualDiff visually compares two images to determine
1339 whether they look alike. It uses a computational model of the human visual
1340 system to detect similarities. This allows it too see beyond irrelevant
1341 differences in file encoding, image quality, and other small variations.")
1342 (license license:gpl2+)))
1344 (define-public steghide
1350 (uri (string-append "mirror://sourceforge/steghide/steghide/"
1351 version "/steghide-" version ".tar.bz2"))
1354 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
1355 (patches (list (search-patch "steghide-fixes.patch")))))
1356 (build-system gnu-build-system)
1358 `(("gettext" ,gettext-minimal)
1359 ("libtool" ,libtool)
1360 ("perl" ,perl))) ;for tests
1362 `(("libmhash" ,libmhash)
1363 ("libmcrypt" ,libmcrypt)
1364 ("libjpeg" ,libjpeg)
1367 `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc
1369 #:phases (modify-phases %standard-phases
1370 (add-before 'configure 'set-perl-search-path
1372 ;; Work around "dotless @INC" build failure.
1374 (string-append (getcwd) "/tests:"
1375 (getenv "PERL5LIB")))
1377 (home-page "http://steghide.sourceforge.net")
1378 (synopsis "Image and audio steganography")
1380 "Steghide is a program to hide data in various kinds of image and audio
1381 files (known as @dfn{steganography}). Neither color nor sample frequencies are
1382 changed, making the embedding resistant against first-order statistical tests.")
1383 (license license:gpl2+)))
1385 (define-public stb-image-for-extempore
1386 (let ((revision "1")
1387 (commit "152a250a702bf28951bb0220d63bc0c99830c498"))
1389 (name "stb-image-for-extempore")
1390 (version (string-append "0-" revision "." (string-take commit 9)))
1392 (origin (method git-fetch)
1394 (url "https://github.com/extemporelang/stb.git")
1398 "0y0aa20pj9311x2ii06zg8xs34idg14hfgldqc5ymizc6cf1qiqv"))
1399 (file-name (string-append name "-" version "-checkout"))))
1400 (build-system cmake-build-system)
1401 (arguments `(#:tests? #f)) ; no tests included
1402 ;; Extempore refuses to build on architectures other than x86_64
1403 (supported-systems '("x86_64-linux"))
1404 (home-page "https://github.com/extemporelang/stb")
1405 (synopsis "Image library for Extempore")
1407 "This package is a collection of assorted single-file libraries. Of
1408 all included libraries only the image loading and decoding library is
1409 installed as @code{stb_image}.")
1410 (license license:public-domain))))
1412 (define-public optipng
1419 (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
1423 "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg"))
1424 (modules '((guix build utils)))
1427 (delete-file-recursively "src/libpng")
1428 (delete-file-recursively "src/zlib")
1430 (build-system gnu-build-system)
1432 `(("libpng" ,libpng)
1436 (modify-phases %standard-phases
1438 (lambda* (#:key outputs #:allow-other-keys)
1439 ;; configure script doesn't accept arguments CONFIG_SHELL and SHELL
1440 (invoke "sh" "configure"
1441 (string-append "--prefix=" (assoc-ref outputs "out"))
1442 "-with-system-libs")
1444 (synopsis "Optimizer that recompresses PNG image files to a smaller size")
1445 (description "OptiPNG is a PNG optimizer that recompresses image
1446 files to a smaller size, without losing any information. This program
1447 also converts external formats (BMP, GIF, PNM and TIFF) to optimized
1448 PNG, and performs PNG integrity checks and corrections.")
1449 (home-page "http://optipng.sourceforge.net/")
1450 (license license:zlib)))
1452 (define-public pngsuite
1455 (version "2017jul19")
1458 (method url-fetch/tarbomb)
1459 (uri (string-append "http://www.schaik.com/pngsuite2011/PngSuite-"
1463 "1j7xgd9iffcnpphhzz9ld9ybrjmx9brhq0803g0450ssr52b5502"))))
1464 (build-system gnu-build-system)
1466 '(#:tests? #f ; there is no test target
1467 #:license-file-regexp "PngSuite.LICENSE"
1469 (modify-phases %standard-phases
1471 (lambda* (#:key outputs #:allow-other-keys)
1472 (let ((out (assoc-ref outputs "out")))
1473 (copy-recursively "." (string-append out "/"))
1476 (delete 'configure))))
1477 (home-page "http://www.schaik.com/pngsuite2011/pngsuite.html")
1478 (synopsis "Example PNGs for use in test suites")
1479 (description "Collection of graphics images created to test PNG
1480 applications like viewers, converters and editors. As far as that is
1481 possible, all formats supported by the PNG standard are represented.")
1482 (license (license:fsdg-compatible "file://PngSuite.LICENSE" "Permission to
1483 use, copy, modify and distribute these images for any purpose and without fee
1484 is hereby granted."))))
1486 (define-public libjpeg-turbo
1488 (name "libjpeg-turbo")
1490 (replacement libjpeg-turbo/fixed)
1493 (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
1494 version "/libjpeg-turbo-" version ".tar.gz"))
1497 "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c"))))
1498 (build-system cmake-build-system)
1502 '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
1503 "-DENABLE_STATIC=0")))
1504 (home-page "https://libjpeg-turbo.org/")
1505 (synopsis "SIMD-accelerated JPEG image handling library")
1506 (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
1507 JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
1508 x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems,
1509 its highly-optimized Huffman coding routines allow it to outperform libjpeg by
1510 a significant amount.
1511 libjpeg-turbo implements both the traditional libjpeg API and the less powerful
1512 but more straightforward TurboJPEG API, and provides a full-featured Java
1513 interface. It supports color space extensions that allow it to compress from
1514 and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
1515 ;; libjpeg-turbo is covered by three different licenses; see LICENSE.md.
1516 (license (list license:bsd-3 ;the TurboJPEG API library and programs
1517 license:ijg ;the libjpeg library and associated tools
1518 license:zlib)))) ;the libjpeg-turbo SIMD extensions
1520 ;; Replacement package to fix CVE-2019-13960 and CVE-2019-2201.
1521 (define libjpeg-turbo/fixed
1523 (inherit libjpeg-turbo)
1527 (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
1528 version "/libjpeg-turbo-" version ".tar.gz"))
1531 "1ds16bnj17v6hzd43w8pzijz3imd9am4hw75ir0fxm240m8dwij2"))
1532 (patches (search-patches "libjpeg-turbo-CVE-2019-2201.patch"))))))
1534 (define-public niftilib
1540 (uri (list (string-append "mirror://sourceforge/niftilib/"
1541 "nifticlib/nifticlib_"
1542 (string-join (string-split version #\.) "_")
1543 "/nifticlib-" version ".tar.gz")))
1545 (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
1546 (build-system gnu-build-system)
1548 '(#:tests? #f ; there is no test target
1549 #:parallel-build? #f ; not supported
1552 (string-append "ZLIB_INC="
1553 (assoc-ref %build-inputs "zlib") "/include")
1554 ;; Append "-fPIC" to CFLAGS.
1555 (string-append "CFLAGS="
1556 "-Wall -ansi -pedantic -fPIC"))
1558 (modify-phases %standard-phases
1560 (lambda* (#:key outputs #:allow-other-keys)
1561 (let ((out (assoc-ref outputs "out")))
1564 (copy-recursively dir (string-append out "/" dir)))
1565 '("bin" "lib" "include")))
1567 (delete 'configure))))
1570 (synopsis "Library for reading and writing files in the nifti-1 format")
1571 (description "Niftilib is a set of i/o libraries for reading and writing
1572 files in the nifti-1 data format - a binary file format for storing
1573 medical image data, e.g. magnetic resonance image (MRI) and functional MRI
1574 (fMRI) brain images.")
1575 (home-page "http://niftilib.sourceforge.net")
1576 (license license:public-domain)))
1578 (define-public gpick
1585 (url "https://github.com/thezbyg/gpick.git")
1586 (commit (string-append name "-" version))))
1587 (file-name (git-file-name name version))
1590 "0mcj806zagh122qgrdkrg0macpzby97y89xi2sjyn3bh8vmmyxjy"))))
1591 (build-system scons-build-system)
1594 ("gettext" ,gnu-gettext)
1595 ("pkg-config" ,pkg-config)))
1602 #:scons ,scons-python2
1603 #:scons-flags (list (string-append "DESTDIR=" %output))
1605 (modify-phases %standard-phases
1606 (add-before 'build 'fix-lua-reference
1608 (substitute* "SConscript"
1609 (("lua5.2") "lua-5.2"))
1611 (home-page "http://www.gpick.org/")
1612 (synopsis "Color picker")
1613 (description "Gpick is an advanced color picker and palette editing tool.")
1614 (license license:bsd-3)))
1616 (define-public libiptcdata
1618 (name "libiptcdata")
1622 (uri (string-append "https://github.com/ianw/libiptcdata"
1623 "/releases/download/release_"
1624 (string-join (string-split version #\.) "_")
1625 "/" name "-" version ".tar.gz"))
1628 "17m2bscc76r1bymjgb44fbbfrdsjfqyb2ivg9wchyllm8pgx1560"))))
1629 (build-system gnu-build-system)
1630 (home-page "https://github.com/ianw/libiptcdata")
1631 (synopsis "IPTC metadata manipulation library")
1633 "Libiptcdata is a C library for manipulating the International Press
1634 Telecommunications Council (@dfn{IPTC}) metadata stored within multimedia files
1635 such as images. This metadata can include captions and keywords, often used by
1636 popular photo management applications. The library provides routines for
1637 parsing, viewing, modifying, and saving this metadata.")
1638 (license license:lgpl2.0+)))
1640 (define-public flameshot
1648 (url "https://github.com/lupoDharkael/flameshot.git")
1649 (commit (string-append "v" version))))
1650 (file-name (git-file-name name version))
1653 "13h77np93r796jf289v4r687cmnpqkyqs34dm9gif4akaig74ky0"))))
1654 (build-system gnu-build-system)
1656 `(("qttools" ,qttools)))
1658 `(("qtbase" ,qtbase)))
1660 `(#:tests? #f ; no tests
1662 (modify-phases %standard-phases
1664 (lambda* (#:key outputs #:allow-other-keys)
1667 (string-append "BASEDIR=" (assoc-ref outputs "out"))
1669 (home-page "https://github.com/lupoDharkael/flameshot")
1670 (synopsis "Powerful yet simple to use screenshot software")
1671 (description "Flameshot is a screenshot program.
1675 @item Customizable appearance.
1677 @item In-app screenshot edition.
1678 @item DBus interface.
1679 @item Upload to Imgur.
1681 (license license:gpl3+)))
1683 (define-public gifsicle
1690 (uri (string-append "https://www.lcdf.org/gifsicle/gifsicle-"
1693 (base32 "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas"))))
1694 (build-system gnu-build-system)
1697 (modify-phases %standard-phases
1698 (add-before 'check 'patch-tests
1700 (substitute* "test/testie"
1708 (native-inputs `(("perl" ,perl))) ; only for tests
1709 (inputs `(("libx11" ,libx11)))
1710 (home-page "https://www.lcdf.org/gifsicle/")
1711 (synopsis "Edit GIF images and animations")
1712 (description "Gifsicle is a command-line GIF image manipulation tool that:
1715 @item Provides a batch mode for changing GIFs in place.
1716 @item Prints detailed information about GIFs, including comments.
1717 @item Control over interlacing, comments, looping, transparency, etc.
1718 @item Creates well-behaved GIFs: removes redundant colors, only uses local color
1720 @item Shrinks colormaps and change images to use the Web-safe palette.
1721 @item Optimizes GIF animations, or unoptimizes them for easier editing.
1724 Two other programs are included with Gifsicle: @command{gifview} is a
1725 lightweight animated-GIF viewer, and @command{gifdiff} compares two GIFs for
1726 identical visual appearance.")
1727 (license license:gpl2+)))
1729 ;; 1.0.7 is buggy and reverted in git repository.
1737 (uri (string-append "mirror://debian/pool/main/j/jp2a/jp2a_"
1738 version ".orig.tar.gz"))
1741 "076frk3pa16s4r1b10zgy81vdlz0385zh3ykbnkaij25jn5aqc09"))))
1742 (build-system gnu-build-system)
1745 ("libjpeg" ,libjpeg)
1746 ("ncurses" ,ncurses)))
1747 (home-page "https://csl.name/jp2a/")
1748 (synopsis "Convert JPEG images to ASCII")
1750 "Jp2a is a small utility that converts JPEG images to ASCII.")
1751 (license license:gpl2)))
1761 (url "https://github.com/emersion/grim.git")
1762 (commit (string-append "v" version))))
1763 (file-name (git-file-name name version))
1765 (base32 "0brljl4zfbn5mh9hkfrfkvd27c5y9vdkgap9r1hrfy9r1x20sskn"))))
1766 (build-system meson-build-system)
1767 (native-inputs `(("pkg-config" ,pkg-config)))
1768 (inputs `(("cairo" ,cairo)
1769 ("libjpeg-turbo" ,libjpeg-turbo)
1771 ("wayland" ,wayland)
1772 ("wayland-protocols" ,wayland-protocols)))
1773 (home-page "https://github.com/emersion/grim")
1774 (synopsis "Create screenshots from a Wayland compositor")
1775 (description "grim can create screenshots from a Wayland compositor.")
1777 (license license:expat)))
1779 (define-public slurp
1787 (url "https://github.com/emersion/slurp.git")
1788 (commit (string-append "v" version))))
1789 (file-name (git-file-name name version))
1791 (base32 "0580m6kaiilgsrcj608r837r37sl6a25y7w21p7d6ij20fs3gvg1"))))
1792 (build-system meson-build-system)
1793 (native-inputs `(("pkg-config" ,pkg-config)))
1794 (inputs `(("cairo" ,cairo)
1796 ("wayland" ,wayland)
1797 ("wayland-protocols" ,wayland-protocols)))
1798 (home-page "https://github.com/emersion/slurp")
1799 (synopsis "Select a region in a Wayland compositor")
1800 (description "Slurp can select a region in a Wayland compositor and print it
1801 to the standard output. It works well together with grim.")
1803 (license license:expat)))
1812 (uri (string-append "mirror://sourceforge/sng/sng-"
1815 (base32 "06a6ydvx9xb3vxvrzdrg3hq0rjwwj9ibr7fyyxjxq6qx1j3mb70i"))))
1816 (build-system gnu-build-system)
1819 (modify-phases %standard-phases
1820 (add-before 'check 'link-pngsuite
1821 ;; tests expect pngsuite in source dir
1822 (lambda* (#:key inputs #:allow-other-keys)
1823 (symlink (assoc-ref inputs "pngsuite") "pngsuite")
1826 (list (string-append "--with-rgbtxt="
1827 (assoc-ref %build-inputs "xorg-rgb")
1828 "/share/X11/rgb.txt"))))
1829 (inputs `(("xorg-rgb" ,xorg-rgb)
1830 ("libpng" ,libpng)))
1831 (native-inputs `(("pngsuite" ,pngsuite)))
1832 (home-page "http://sng.sourceforge.net")
1833 (synopsis "Markup language for representing PNG contents")
1834 (description "SNG (Scriptable Network Graphics) is a minilanguage designed
1835 specifically to represent the entire contents of a PNG (Portable Network
1836 Graphics) file in an editable form. Thus, SNGs representing elaborate
1837 graphics images and ancillary chunk data can be readily generated or modified
1838 using only text tools.
1840 SNG is implemented by a compiler/decompiler called sng that
1841 losslessly translates between SNG and PNG.")
1842 (license license:zlib)))