gnu: r-arrmdata: Use bioconductor-uri.
[jackhill/guix/guix.git] / gnu / packages / image.scm
CommitLineData
e55354b8 1;;; GNU Guix --- Functional package management for GNU
eafd0390 2;;; Copyright © 2013, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
451b5c5d 3;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
86fa2ea9 4;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
85a02905 5;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
9538014a 6;;; Copyright © 2014, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
0731a47c 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
fcc43c1f 8;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
21122bd7 9;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
bc806b0c 10;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
115ace6b 11;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
10db6778 12;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
1fa3e336 13;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
2235abb2 14;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
3c8ba11a 15;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
47956fa0 16;;; Copyright © 2017 ng0 <ng0@n0.is>
8db1bd18 17;;; Copyright © 2017,2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
f2079849 18;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
da4dde61 19;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
62813c10 20;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
4715f92e 21;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
910a20e2 22;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
3239dcd3 23;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
6e35bad0 24;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
0290f533 25;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
e55354b8
DT
26;;;
27;;; This file is part of GNU Guix.
28;;;
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.
33;;;
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.
38;;;
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/>.
41
42(define-module (gnu packages image)
43 #:use-module (gnu packages)
97039f6e 44 #:use-module (gnu packages algebra)
37e05d64 45 #:use-module (gnu packages assembly)
894e2cba 46 #:use-module (gnu packages autotools)
97039f6e 47 #:use-module (gnu packages boost)
ac257f12 48 #:use-module (gnu packages check)
3239dcd3 49 #:use-module (gnu packages curl)
e55354b8 50 #:use-module (gnu packages compression)
99828fa7 51 #:use-module (gnu packages documentation)
efa77baf 52 #:use-module (gnu packages fontutils)
0290f533 53 #:use-module (gnu packages freedesktop)
0bd1097c
LF
54 ;; To provide gcc@5 and gcc@6, to work around <http://bugs.gnu.org/24703>.
55 #:use-module (gnu packages gcc)
1fa3e336 56 #:use-module (gnu packages gettext)
97039f6e 57 #:use-module (gnu packages ghostscript)
060ad3de 58 #:use-module (gnu packages gl)
023f0fb0 59 #:use-module (gnu packages glib)
ced7cc92 60 #:use-module (gnu packages graphics)
f2079849
JL
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages lua)
0290f533 63 #:use-module (gnu packages man)
97039f6e 64 #:use-module (gnu packages maths)
1fa3e336 65 #:use-module (gnu packages mcrypt)
115ace6b 66 #:use-module (gnu packages mp3)
dc7e5783 67 #:use-module (gnu packages ncurses)
97039f6e 68 #:use-module (gnu packages perl)
a5d4c96b 69 #:use-module (gnu packages photo)
efa77baf 70 #:use-module (gnu packages pkg-config)
97039f6e 71 #:use-module (gnu packages python)
44d10b1f 72 #:use-module (gnu packages python-xyz)
9d0c291e 73 #:use-module (gnu packages sphinx)
efa77baf 74 #:use-module (gnu packages xml)
76d88cfa 75 #:use-module (gnu packages xorg)
84567657 76 #:use-module (gnu packages qt)
b5b73a82 77 #:use-module ((guix licenses) #:prefix license:)
e55354b8
DT
78 #:use-module (guix packages)
79 #:use-module (guix download)
ac2a38a5 80 #:use-module (guix git-download)
38c55e5c 81 #:use-module (guix build-system gnu)
e596ab0f 82 #:use-module (guix build-system cmake)
0290f533 83 #:use-module (guix build-system meson)
f2079849 84 #:use-module (guix build-system python)
2235abb2 85 #:use-module (guix build-system scons)
e596ab0f 86 #:use-module (srfi srfi-1))
e55354b8
DT
87
88(define-public libpng
89 (package
90 (name "libpng")
8b5b3aca 91 (version "1.6.37")
e55354b8
DT
92 (source (origin
93 (method url-fetch)
a2f3c614 94 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
21ef9843
MW
95 version "/libpng-" version ".tar.xz")
96 (string-append
97 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
913059a1
EF
98 "/libpng16/libpng-" version ".tar.xz")
99 (string-append
100 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
101 "/libpng16/libpng-" version ".tar.xz")))
e55354b8 102 (sha256
8fda37bc 103 (base32
8b5b3aca 104 "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh"))))
e55354b8 105 (build-system gnu-build-system)
420b0137
MB
106 (arguments
107 `(#:configure-flags '("--disable-static")))
e55354b8
DT
108
109 ;; libpng.la says "-lz", so propagate it.
110 (propagated-inputs `(("zlib" ,zlib)))
111
112 (synopsis "Library for handling PNG files")
113 (description
114 "Libpng is the official PNG (Portable Network Graphics) reference
35b9e423 115library. It supports almost all PNG features and is extensible.")
e55354b8
DT
116 (license license:zlib)
117 (home-page "http://www.libpng.org/pub/png/libpng.html")))
118
e0958c2d 119;; libpng-apng should be updated when the APNG patch is released:
120;; <https://bugs.gnu.org/27556>
114a325e 121(define-public libpng-apng
122 (package
114a325e 123 (name "libpng-apng")
e0958c2d 124 (version "1.6.28")
125 (source
126 (origin
127 (method url-fetch)
128 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
129 version "/libpng-" version ".tar.xz")
130 (string-append
131 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
132 "/libpng16/libpng-" version ".tar.xz")
133 (string-append
134 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
135 "/libpng16/libpng-" version ".tar.xz")))
136 (sha256
137 (base32
138 "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq"))))
139 (build-system gnu-build-system)
114a325e 140 (arguments
696f1d0f
LF
141 `(#:modules ((guix build gnu-build-system)
142 (guix build utils)
143 (srfi srfi-1))
144 #:phases
114a325e 145 (modify-phases %standard-phases
146 (add-after 'unpack 'patch-apng
147 (lambda* (#:key inputs #:allow-other-keys)
148 (define (apply-patch file)
fccacffb
MW
149 (invoke "patch" "-p1" "--force"
150 "--input" file))
114a325e 151 (let ((apng.gz (assoc-ref inputs "apng")))
152 (format #t "Applying APNG patch '~a'...~%"
153 apng.gz)
fccacffb
MW
154 (invoke "sh" "-c"
155 (string-append "gunzip < " apng.gz " > the-patch"))
156 (apply-patch "the-patch")
157 #t)))
114a325e 158 (add-before 'configure 'no-checks
159 (lambda _
160 (substitute* "Makefile.in"
161 (("^scripts/symbols.chk") "")
162 (("check: scripts/symbols.chk") ""))
114a325e 163 #t)))))
164 (inputs
165 `(("apng" ,(origin
166 (method url-fetch)
167 (uri
168 (string-append "mirror://sourceforge/libpng-apng/libpng16/"
169 version "/libpng-" version "-apng.patch.gz"))
170 (sha256
171 (base32
e0958c2d 172 "0m5nv70n9903x3xzxw9qqc6sgf2rp106ha0x6gix0xf8wcrljaab"))))))
114a325e 173 (native-inputs
174 `(("libtool" ,libtool)))
e0958c2d 175 ;; libpng.la says "-lz", so propagate it.
176 (propagated-inputs
177 `(("zlib" ,zlib)))
114a325e 178 (synopsis "APNG patch for libpng")
179 (description
180 "APNG (Animated Portable Network Graphics) is an unofficial
181extension of the APNG (Portable Network Graphics) format.
182APNG patch provides APNG support to libpng.")
e0958c2d 183 (home-page "https://sourceforge.net/projects/libpng-apng/")
184 (license license:zlib)))
114a325e 185
2df831a7
RW
186(define-public libpng-1.2
187 (package
188 (inherit libpng)
6cdd8c97 189 (version "1.2.59")
2df831a7
RW
190 (source
191 (origin
192 (method url-fetch)
2df831a7
RW
193 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
194 version "/libpng-" version ".tar.xz")
195 (string-append
196 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
913059a1
EF
197 "/libpng12/libpng-" version ".tar.xz")
198 (string-append
199 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
2df831a7
RW
200 "/libpng12/libpng-" version ".tar.xz")))
201 (sha256
6cdd8c97
LF
202 (base32
203 "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl"))))))
2df831a7 204
1ee13e01 205(define-public pngcrush
2f8b9c46 206 (package
1ee13e01 207 (name "pngcrush")
208 (version "1.8.13")
2f8b9c46
HG
209 (source (origin
210 (method url-fetch)
211 (uri (string-append "mirror://sourceforge/pmt/pngcrush/"
1ee13e01 212 version "/pngcrush-" version "-nolib.tar.xz"))
2f8b9c46 213 (sha256 (base32
1ee13e01 214 "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv"))))
2f8b9c46
HG
215 (build-system gnu-build-system)
216 (arguments
1ee13e01 217 '(#:tests? #f ; no check target
2f8b9c46
HG
218 #:phases
219 (modify-phases %standard-phases
220 (replace 'configure
221 (lambda* (#:key inputs outputs #:allow-other-keys)
1ee13e01 222 (substitute* "Makefile"
2f8b9c46
HG
223 (("^(PNG(INC|LIB) = )/usr/local/" line vardef)
224 (string-append vardef (assoc-ref inputs "libpng") "/"))
225 (("^(Z(INC|LIB) = )/usr/local/" line vardef)
226 (string-append vardef (assoc-ref inputs "zlib") "/"))
227 ;; The Makefile is written by hand and not using $PREFIX
228 (("\\$\\(DESTDIR\\)/usr/")
fccacffb
MW
229 (string-append (assoc-ref outputs "out") "/")))
230 #t)))))
2f8b9c46
HG
231 (inputs
232 `(("libpng" ,libpng)
233 ("zlib" , zlib)))
1ee13e01 234 (home-page "https://pmt.sourceforge.io/pngcrush")
2f8b9c46 235 (synopsis "Utility to compress PNG files")
85a4531f
AB
236 (description "Pngcrush optimizes @acronym{PNG, Portable Network Graphics}
237images. It can further losslessly compress them by as much as 40%.")
2f8b9c46
HG
238 (license license:zlib)))
239
1ee13e01 240(define-public pngcrunch
241 ;; This package used to be wrongfully name "pngcrunch".
242 (deprecated-package "pngcrunch" pngcrush))
243
6e35bad0
AV
244(define-public pnglite
245 (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
246 (revision "1"))
247 (package
248 (name "pnglite")
249 ;; The project was moved from sourceforge to github.
250 ;; The latest version in sourceforge was 0.1.17:
251 ;; https://sourceforge.net/projects/pnglite/files/pnglite/
252 ;; No releases are made in github.
253 (version (git-version "0.1.17" revision commit))
254 (source (origin
255 (method git-fetch)
256 (uri (git-reference
257 (url "https://github.com/dankar/pnglite")
258 (commit commit)))
259 (sha256
260 (base32
261 "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby"))
262 (file-name (git-file-name name version))))
263 (build-system gnu-build-system)
264 (arguments
265 `(#:tests? #f ; no tests
266 #:phases
267 (modify-phases %standard-phases
268 (delete 'configure)
269 (replace 'build
270 (lambda _
271 ;; common build flags for building shared libraries
272 (let ((cflags '("-O2" "-g" "-fPIC"))
273 (ldflags '("-shared")))
274 (apply invoke
275 `("gcc"
276 "-o" "libpnglite.so"
277 ,@cflags
278 ,@ldflags
279 "pnglite.c"))
280 #t)))
281 (replace 'install
282 (lambda* (#:key outputs #:allow-other-keys)
283 (let* ((out (assoc-ref outputs "out"))
284 (lib (string-append out "/lib/"))
285 (include (string-append out "/include/"))
286 (doc (string-append out "/share/doc/"
287 ,name "-" ,version "/")))
288 (install-file "libpnglite.so" lib)
289 (install-file "pnglite.h" include)
290 (install-file "README.md" doc)
291 #t))))))
292 (inputs `(("zlib" ,zlib)))
293 (home-page "https://github.com/dankar/pnglite")
294 (synopsis "Pretty small png library")
295 (description "A pretty small png library.
296Currently all documentation resides in @file{pnglite.h}.")
297 (license license:zlib))))
298
8db1bd18
HG
299(define-public libimagequant
300 (package
301 (name "libimagequant")
302 (version "2.12.3")
303 (source
304 (origin
305 (method git-fetch)
306 (uri (git-reference
307 (url "https://github.com/ImageOptim/libimagequant.git")
308 (commit version)))
309 (file-name (git-file-name name version))
310 (sha256
311 (base32 "0qsfq1kv1m5jzn9v9iz0bac66k4clcis1c9877qabnwzwmwma5v0"))))
312 (build-system gnu-build-system)
313 (arguments
314 '(#:tests? #f)) ; no check target
315 (home-page "https://pngquant.org/lib/")
316 (synopsis "Image palette quantization library")
317 (description "libimagequant is a small, portable C library for
318high-quality conversion of RGBA images to 8-bit indexed-color (palette)
319images. This library can significantly reduces file sizes and powers pngquant
320and other PNG optimizers.")
321 (license license:gpl3+)))
322
6b61dea3
HG
323(define-public pngquant
324 (package
325 (name "pngquant")
326 (version "2.12.3")
327 (source
328 (origin
329 (method git-fetch)
330 (uri (git-reference
331 (url "https://github.com/kornelski/pngquant.git")
332 (commit version)))
333 (file-name (git-file-name name version))
334 (sha256
335 (base32 "1yiwbcihn4311fpfd568gg8zmmhqwg80jmhbhkb5msiipgd9xv33"))))
336 (build-system gnu-build-system)
337 (arguments
338 `(#:test-target "test"
339 #:configure-flags
340 '("--with-openmp" "--with-lcms2")))
341 (native-inputs
342 `(("pkg-config" ,pkg-config)))
343 (inputs
344 `(("libpng" ,libpng)
345 ("zlib" , zlib)
346 ("lcms" ,lcms)
347 ("libimagequant" ,libimagequant)))
348 (home-page "https://pngquant.org/")
349 (synopsis "Utility and library for lossy compressing PNG images")
350 (description "pngquant is a PNG compressor that significantly reduces file
351sizes by converting images to a more efficient 8-bit PNG format with alpha
352channel (often 60-80% smaller than 24/32-bit PNG files). Compressed images
353are fully standards-compliant and are supported by all web browsers and
354operating systems.
355
356Features:
357@enumerate
358@item High-quality palette generation using a combination of vector
359 quantization algorithms.
360@item Unique adaptive dithering algorithm that adds less noise to images
361 than the standard Floyd-Steinberg.
362@item Easy to integrate with shell scripts, GUIs and server-side software.
363@item Fast mode for real-time processing/large numbers of images.
364@end enumerate")
365 (license license:gpl3+)))
366
e55354b8
DT
367(define-public libjpeg
368 (package
369 (name "libjpeg")
38e4d595 370 (version "9c")
e55354b8
DT
371 (source (origin
372 (method url-fetch)
60562ec2 373 (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
e55354b8
DT
374 version ".tar.gz"))
375 (sha256 (base32
38e4d595 376 "08kixcf3a7s9x91174abjnk1xbvj4v8crdc73zi4k9h3jfbm00k5"))))
e55354b8 377 (build-system gnu-build-system)
35b9e423 378 (synopsis "Library for handling JPEG files")
e55354b8
DT
379 (description
380 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
381JPEG is a standardized compression method for full-color and gray-scale
382images.
61853b74
MC
383It also includes programs that provide conversion between the JPEG format and
384image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats, as well as
385lossless JPEG manipulations such as rotation, scaling or cropping:
386@enumerate
387@item cjpeg
388@item djpeg
389@item jpegtran
390@item rdjpgcom
391@item wrjpgcom
392@end enumerate")
e55354b8 393 (license license:ijg)
60562ec2 394 (home-page "https://www.ijg.org/")))
e55354b8
DT
395
396(define-public libjpeg-8
397 (package (inherit libjpeg)
398 (version "8d")
399 (source (origin
400 (method url-fetch)
60562ec2 401 (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
e55354b8
DT
402 version ".tar.gz"))
403 (sha256 (base32
404 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
fcc43c1f 405
b81245cc
KK
406(define-public libjxr
407 (package
408 (name "libjxr")
409 (version "1.1")
410 (source (origin
411 ;; We are using the Debian source because CodePlex does not
412 ;; deliver an easily downloadable tarball.
413 (method url-fetch)
414 (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
415 version ".orig.tar.gz"))
416 (sha256
417 (base32
418 "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
419 (patch-flags '("-p1" "--binary"))
420 (patches (search-patches "libjxr-fix-function-signature.patch"
421 "libjxr-fix-typos.patch"))))
422 (build-system gnu-build-system)
8b9570ad
KK
423 (arguments
424 '(#:make-flags
425 (list "CC=gcc"
426 ;; A substitute* procedure call would be enough to add the -fPIC
427 ;; flag if there was no file decoding error.
428 ;; The makefile is a "Non-ISO extended-ASCII text, with CRLF line
429 ;; terminators" according to the file(1) utility.
430 (string-append "CFLAGS=-I. -Icommon/include -Iimage/sys -fPIC "
431 "-D__ANSI__ -DDISABLE_PERF_MEASUREMENT -w -O "))
432 #:tests? #f ; no check target
433 #:phases
434 (modify-phases %standard-phases
435 (delete 'configure) ; no configure script
436 (add-after 'build 'build-shared-library
437 (lambda _
438 ;; The Makefile uses optimization level 1, so the same
439 ;; level is used here for consistency.
440 (invoke "gcc" "-shared" "-fPIC" "-O"
441 ;; Common files.
442 "adapthuff.o" "image.o" "strcodec.o" "strPredQuant.o"
443 "strTransform.o" "perfTimerANSI.o"
444 ;; Decoding files.
445 "decode.o" "postprocess.o" "segdec.o" "strdec.o"
446 "strInvTransform.o" "strPredQuantDec.o" "JXRTranscode.o"
447 ;; Encoding files.
448 "encode.o" "segenc.o" "strenc.o" "strFwdTransform.o"
449 "strPredQuantEnc.o"
450 "-o" "libjpegxr.so")
451 (invoke "gcc" "-shared" "-fPIC" "-O"
452 ;; Glue files.
453 "JXRGlue.o" "JXRMeta.o" "JXRGluePFC.o" "JXRGlueJxr.o"
454 ;; Test files.
455 "JXRTest.o" "JXRTestBmp.o" "JXRTestHdr.o" "JXRTestPnm.o"
456 "JXRTestTif.o" "JXRTestYUV.o"
457 "-o" "libjxrglue.so")))
458 ;; The upstream makefile does not include an install phase.
459 (replace 'install
460 (lambda* (#:key outputs #:allow-other-keys)
461 (let* ((out (assoc-ref outputs "out"))
462 (bin (string-append out "/bin"))
463 (lib (string-append out "/lib"))
464 (include (string-append out "/include/jxrlib")))
465 (for-each (lambda (file)
466 (install-file file include)
467 (delete-file file))
468 (append
469 '("jxrgluelib/JXRGlue.h"
470 "jxrgluelib/JXRMeta.h"
471 "jxrtestlib/JXRTest.h"
472 "image/sys/windowsmediaphoto.h")
473 (find-files "common/include" "\\.h$")))
474 (for-each (lambda (file)
475 (install-file file lib)
476 (delete-file file))
477 (find-files "." "\\.(a|so)$"))
478 (for-each (lambda (file)
479 (install-file file bin)
480 (delete-file file))
481 '("JxrDecApp" "JxrEncApp")))
482 #t)))))
b81245cc
KK
483 (synopsis "Implementation of the JPEG XR standard")
484 (description "JPEG XR is an approved ISO/IEC International standard (its
485official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
486 (license
487 (license:non-copyleft
488 "file://Makefile"
489 "See the header of the Makefile in the distribution."))
490 (home-page "https://jxrlib.codeplex.com/")))
491
fcc43c1f
AB
492(define-public jpegoptim
493 (package
494 (name "jpegoptim")
b01a8790 495 (version "1.4.6")
fcc43c1f
AB
496 (source (origin
497 (method url-fetch)
498 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
499 version ".tar.gz"))
500 (sha256 (base32
b01a8790 501 "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8"))))
fcc43c1f
AB
502 (build-system gnu-build-system)
503 (inputs `(("libjpeg" ,libjpeg)))
504 (arguments
b01a8790 505 '(#:tests? #f)) ; no tests
fcc43c1f
AB
506 (synopsis "Optimize JPEG images")
507 (description
508 "jpegoptim provides lossless optimization (based on optimizing
509the Huffman tables) and \"lossy\" optimization based on setting
510maximum quality factor.")
511 (license license:gpl2+)
ada3b94f 512 (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim")))
e55354b8 513
f5e4229a
BT
514(define-public libicns
515 (package
516 (name "libicns")
517 (version "0.8.1")
518 (source (origin
519 (method url-fetch)
520 (uri (string-append
521 "mirror://sourceforge/icns/"
522 "libicns-" version ".tar.gz"))
523 (sha256
524 (base32
525 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
526 (build-system gnu-build-system)
527 (inputs
528 `(("libpng" ,libpng)
529 ("jasper" ,jasper)))
530 (arguments
531 `(#:tests? #t)) ; No tests.
532 (home-page "http://icns.sourceforge.net/")
533 (synopsis "Library for handling Mac OS icns resource files")
534 (description
535 "Libicns is a library for the manipulation of Mac OS IconFamily resource
536type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
537convert between PNG and ICNS. @command{icns2png} will extract image files from
538ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
539with .desktop files. Additionally, @command{icontainer2png} is provided for
540extracting icontainer icon files.")
541 (license (list license:lgpl2.1+ ; libicns
542 license:lgpl2.0+ ; src/apidocs.*
543 license:gpl2+)))) ; icns2png, png2icns, icontainer2png
544
e55354b8
DT
545(define-public libtiff
546 (package
547 (name "libtiff")
3f2848a5 548 (version "4.0.10")
c8eb2b8c
LF
549 (source
550 (origin
551 (method url-fetch)
9d7d8e71 552 (uri (string-append "http://download.osgeo.org/libtiff/tiff-"
c8eb2b8c 553 version ".tar.gz"))
c8eb2b8c
LF
554 (sha256
555 (base32
3f2848a5 556 "1r4np635gr6zlc0bic38dzvxia6iqzcrary4n1ylarzpr8fd2lic"))))
e55354b8 557 (build-system gnu-build-system)
6f6eb857
LC
558 (outputs '("out"
559 "doc")) ;1.3 MiB of HTML documentation
560 (arguments
561 ;; Instead of using --docdir, this package has its own --with-docdir.
562 `(#:configure-flags (list (string-append "--with-docdir="
563 (assoc-ref %outputs "doc")
564 "/share/doc/"
565 ,name "-" ,version))))
e55354b8 566 (inputs `(("zlib" ,zlib)
1de0afd5 567 ("libjpeg" ,libjpeg)))
35b9e423 568 (synopsis "Library for handling TIFF files")
e55354b8
DT
569 (description
570 "Libtiff provides support for the Tag Image File Format (TIFF), a format
571used for storing image data.
572Included are a library, libtiff, for reading and writing TIFF and a small
573collection of tools for doing simple manipulations of TIFF images.")
166191b3
LC
574 (license (license:non-copyleft "file://COPYRIGHT"
575 "See COPYRIGHT in the distribution."))
0bd1097c 576 (home-page "http://www.simplesystems.org/libtiff/")))
ed5940b6 577
894e2cba
TUBK
578(define-public leptonica
579 (package
580 (name "leptonica")
340502ba 581 (version "1.74.4")
894e2cba
TUBK
582 (source
583 (origin
69f7d3f4
RW
584 (method git-fetch)
585 (uri (git-reference
586 (url "https://github.com/DanBloomberg/leptonica.git")
587 (commit version)))
588 (file-name (git-file-name name version))
894e2cba 589 (sha256
69f7d3f4 590 (base32 "0sfg1ky0lghlq7xx0qii5167bim0wwfnnr83dl4skbj9awyvjiwi"))))
894e2cba
TUBK
591 (build-system gnu-build-system)
592 (native-inputs
d02fb7ce
TUBK
593 `(("gnuplot" ,gnuplot) ;needed for test suite
594 ("autoconf" ,autoconf)
595 ("automake" ,automake)
596 ("libtool" ,libtool)
597 ("pkg-config" ,pkg-config)))
894e2cba
TUBK
598 (inputs
599 `(("giflib" ,giflib)
600 ("libjpeg" ,libjpeg)
601 ("libpng" ,libpng)
602 ("libtiff" ,libtiff)
603 ("libwebp" ,libwebp)))
604 (propagated-inputs
d02fb7ce 605 ;; Linking a program with leptonica also requires these.
894e2cba
TUBK
606 `(("openjpeg" ,openjpeg)
607 ("zlib" ,zlib)))
608 (arguments
d02fb7ce 609 '(#:phases
894e2cba 610 (modify-phases %standard-phases
d02fb7ce
TUBK
611 (add-after 'unpack 'patch-reg-wrapper
612 (lambda _
613 (substitute* "prog/reg_wrapper.sh"
614 ((" /bin/sh ")
615 (string-append " " (which "sh") " "))
616 (("which gnuplot")
fccacffb
MW
617 "true"))
618 #t)))))
894e2cba
TUBK
619 (home-page "http://www.leptonica.com/")
620 (synopsis "Library and tools for image processing and analysis")
621 (description
622 "Leptonica is a C library and set of command-line tools for efficient
623image processing and image analysis operations. It supports rasterop, affine
624transformations, binary and grayscale morphology, rank order, and convolution,
625seedfill and connected components, image transformations combining changes in
626scale and pixel depth, and pixelwise masking, blending, enhancement, and
627arithmetic ops.")
628 (license license:bsd-2)))
629
8d9872b5
MB
630(define-public jbig2dec
631 (package
632 (name "jbig2dec")
b70ffe4e 633 (version "0.16")
fb94354a
MB
634 (source (origin
635 (method url-fetch)
636 (uri (string-append "https://github.com/ArtifexSoftware"
637 "/ghostpdl-downloads/releases/download"
b70ffe4e 638 "/gs927/" name "-" version ".tar.gz"))
fb94354a
MB
639 (sha256
640 (base32
b70ffe4e 641 "00h61y7bh3z6mqfzxyb318gyh0f8jwarg4hvlrm83rqps8avzxm4"))
fb94354a 642 (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
8d9872b5 643 (build-system gnu-build-system)
5e537222 644 (arguments '(#:configure-flags '("--disable-static")))
8d9872b5
MB
645 (synopsis "Decoder of the JBIG2 image compression format")
646 (description
36a4366d 647 "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
7c125ce0
AK
648monochrome) images at moderately high resolution, and in particular scanned
649paper documents. In this domain it is very efficient, offering compression
650ratios on the order of 100:1.
8d9872b5
MB
651
652This is a decoder only implementation, and currently is in the alpha
653stage, meaning it doesn't completely work yet. However, it is
654maintaining parity with available encoders, so it is useful for real
655work.")
6acc671b 656 (home-page "https://jbig2dec.com")
8d9872b5 657 (license license:gpl2+)))
38c55e5c 658
8f685df2
TGR
659(define-public jbigkit
660 (package
661 (name "jbigkit")
662 (version "2.1")
663 (source
664 (origin
665 (method url-fetch)
666 (uri (string-append "https://www.cl.cam.ac.uk/~mgk25/jbigkit/"
667 "download/jbigkit-" version ".tar.gz"))
668 (sha256
669 (base32 "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy"))
670 (modules '((guix build utils)))
671 (snippet
672 '(begin
673 ;; Remove files without clear licence information.
674 (for-each delete-file-recursively
675 (list "contrib" "examples"))
676 #t))))
677 (build-system gnu-build-system)
678 (outputs (list "out" "pbmtools"))
679 (arguments
680 `(#:modules ((srfi srfi-26)
681 ,@%gnu-build-system-modules)
682 #:phases
683 (modify-phases %standard-phases
684 (delete 'configure) ; no configure script
685 (replace 'install ; no ‘make install’ target
686 (lambda* (#:key outputs #:allow-other-keys)
687 (let* ((out (assoc-ref outputs "out"))
688 (lib (string-append out "/lib"))
689 (include (string-append out "/include")))
690 (with-directory-excursion "libjbig"
691 (for-each (cut install-file <> include)
692 (find-files "." "\\.h$"))
693 (for-each (cut install-file <> lib)
694 (find-files "." "\\.a$")))
695 #t)))
696 (add-after 'install 'install-pbmtools
697 (lambda* (#:key outputs #:allow-other-keys)
698 (let* ((out (assoc-ref outputs "pbmtools"))
699 (bin (string-append out "/bin"))
700 (man1 (string-append out "/share/man/man1"))
701 (man5 (string-append out "/share/man/man5")))
702 (with-directory-excursion "pbmtools"
703 (for-each (cut install-file <> bin)
704 (list "jbgtopbm" "jbgtopbm85"
705 "pbmtojbg" "pbmtojbg85"))
706
707 (for-each (cut install-file <> man1)
708 (find-files "." "\\.1$"))
709 (for-each (cut install-file <> man5)
710 (find-files "." "\\.5$"))
711 #t)))))
712 #:test-target "test"
713 #:tests? #f)) ; tests depend on examples/
714 (home-page "https://www.cl.cam.ac.uk/~mgk25/jbigkit/")
715 (synopsis "Lossless compression for bi-level high-resolution images")
716 (description
717 "JBIG-KIT implements the JBIG1 data compression standard (ITU-T T.82 and
718ISO/IEC 11544:1993), designed for bi-level (one bit per pixel) images such as
719black-and-white scanned documents. It is widely used in fax products, printer
720firmware and drivers, document management systems, and imaging software.
721
722This package provides a static C library of (de)compression functions and some
723simple command-line converters similar to those provided by netpbm.
724
725Two JBIG1 variants are available. One (@file{jbig.c}) implements nearly all
726options of the standard but has to keep the full uncompressed image in memory.
727The other (@file{jbig85.c}) implements just the ITU-T T.85 profile, with
728memory management optimized for embedded and fax applications. It buffers
729only a few lines of the uncompressed image in memory and is able to stream
730images of initially unknown height.")
731 (license (list license:isc ; pbmtools/p?m.5
732 license:gpl2+)))) ; the rest
733
38c55e5c
MB
734(define-public openjpeg
735 (package
736 (name "openjpeg")
de1b5e49
MB
737 (version "2.3.1")
738 (source (origin
739 (method git-fetch)
740 (uri (git-reference
741 (url "https://github.com/uclouvain/openjpeg")
742 (commit (string-append "v" version))))
743 (file-name (git-file-name "openjpeg" version))
744 (sha256
745 (base32
746 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb"))))
38c55e5c
MB
747 (build-system cmake-build-system)
748 (arguments
8de1979d
MB
749 '(#:tests? #f ;TODO: requires a 1.1 GiB data repository
750 #:configure-flags '("-DBUILD_STATIC_LIBS=OFF")))
38c55e5c
MB
751 (inputs
752 `(("lcms" ,lcms)
753 ("libpng" ,libpng)
754 ("libtiff" ,libtiff)
755 ("zlib" ,zlib)))
756 (synopsis "JPEG 2000 codec")
757 (description
758 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
759been developed in order to promote the use of JPEG 2000, the new
760still-image compression standard from the Joint Photographic Experts
761Group (JPEG).
762
763In addition to the basic codec, various other features are under
764development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
765an indexing tool useful for the JPIP protocol, JPWL-tools for
766error-resilience, a Java-viewer for j2k-images, ...")
b9270582 767 (home-page "https://github.com/uclouvain/openjpeg")
38c55e5c 768 (license license:bsd-2)))
76d88cfa 769
6140b9d8
RW
770(define-public openjpeg-1
771 (package (inherit openjpeg)
772 (name "openjpeg")
773 (version "1.5.2")
774 (source
775 (origin
776 (method url-fetch)
777 (uri
de67e922
LF
778 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
779 name "-" version ".tar.gz"))
6140b9d8
RW
780 (sha256
781 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
782
e596ab0f
AK
783(define-public giflib
784 (package
785 (name "giflib")
3fdb2a84 786 (version "5.1.4")
e596ab0f
AK
787 (source (origin
788 (method url-fetch)
789 (uri (string-append "mirror://sourceforge/giflib/giflib-"
de67e922 790 version ".tar.bz2"))
e596ab0f 791 (sha256
44c5f025 792 (base32
7ac43c44
HG
793 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))
794 (patches (search-patches
795 "giflib-make-reallocarray-private.patch"))))
e596ab0f
AK
796 (build-system gnu-build-system)
797 (outputs '("bin" ; utility programs
798 "out")) ; library
799 (inputs `(("libx11" ,libx11)
800 ("libice" ,libice)
801 ("libsm" ,libsm)
802 ("perl" ,perl)))
803 (arguments
44c5f025
EF
804 `(#:phases
805 (modify-phases %standard-phases
806 (add-after 'unpack 'disable-html-doc-gen
807 (lambda _
808 (substitute* "doc/Makefile.in"
4a3ee3fb
MW
809 (("^all: allhtml manpages") ""))
810 #t))
44c5f025
EF
811 (add-after 'install 'install-manpages
812 (lambda* (#:key outputs #:allow-other-keys)
813 (let* ((bin (assoc-ref outputs "bin"))
814 (man1dir (string-append bin "/share/man/man1")))
815 (mkdir-p man1dir)
816 (for-each (lambda (file)
817 (let ((base (basename file)))
818 (format #t "installing `~a' to `~a'~%"
819 base man1dir)
820 (copy-file file
821 (string-append
822 man1dir "/" base))))
4a3ee3fb
MW
823 (find-files "doc" "\\.1"))
824 #t))))))
e596ab0f
AK
825 (synopsis "Tools and library for working with GIF images")
826 (description
35b9e423 827 "GIFLIB is a library for reading and writing GIF images. It is API and
e596ab0f
AK
828ABI compatible with libungif which was in wide use while the LZW compression
829algorithm was patented. Tools are also included to convert, manipulate,
830compose, and analyze GIF images.")
831 (home-page "http://giflib.sourceforge.net/")
832 (license license:x11)))
833
0731a47c
TUBK
834(define-public libungif
835 (package
836 (name "libungif")
837 (version "4.1.4")
838 (source (origin
839 (method url-fetch)
de67e922
LF
840 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
841 "libungif-" version "/libungif-"
0731a47c
TUBK
842 version ".tar.bz2"))
843 (sha256
844 (base32
845 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
846 (build-system gnu-build-system)
847 (inputs `(("perl" ,perl))) ;package ships some perl tools
848 (home-page "http://giflib.sourceforge.net/")
849 (synopsis "GIF decompression library")
850 (description
851 "libungif is the old GIF decompression library by the GIFLIB project.")
852 (license license:expat)))
853
76d88cfa
AK
854(define-public imlib2
855 (package
856 (name "imlib2")
115ace6b 857 (version "1.6.0")
76d88cfa
AK
858 (source (origin
859 (method url-fetch)
860 (uri (string-append
de67e922
LF
861 "mirror://sourceforge/enlightenment/imlib2-src/" version
862 "/imlib2-" version ".tar.bz2"))
76d88cfa
AK
863 (sha256
864 (base32
115ace6b 865 "07b9v3ycwhici35fnczvpyjpgkc7gbcdhajpl9dwhpzdzbfl1i6g"))))
76d88cfa 866 (build-system gnu-build-system)
76d88cfa
AK
867 (native-inputs
868 `(("pkgconfig" ,pkg-config)))
869 (inputs
e56d02a0 870 `(("bzip2" ,bzip2)
76d88cfa 871 ("freetype" ,freetype)
e56d02a0
EF
872 ("giflib" ,giflib)
873 ("libid3tag" ,libid3tag)
76d88cfa
AK
874 ("libjpeg" ,libjpeg)
875 ("libpng" ,libpng)
876 ("libtiff" ,libtiff)
e56d02a0
EF
877 ("libx11" ,libx11)
878 ("libxext" ,libxext)
879 ("libwebp" ,libwebp)))
3b3b60d0 880 (home-page "https://sourceforge.net/projects/enlightenment/")
76d88cfa
AK
881 (synopsis
882 "Loading, saving, rendering and manipulating image files")
883 (description
884 "Imlib2 is a library that does image file loading and saving as well as
885rendering, manipulation, arbitrary polygon support, etc.
886
887It does ALL of these operations FAST. Imlib2 also tries to be highly
888intelligent about doing them, so writing naive programs can be done easily,
889without sacrificing speed.
890
891This is a complete rewrite over the Imlib 1.x series. The architecture is
892more modular, simple, and flexible.")
8835aed4 893 (license license:imlib2)))
f7d28082
AK
894
895(define-public giblib
896 (package
897 (name "giblib")
898 (version "1.2.4")
899 (source (origin
900 (method url-fetch)
bf512da1
EF
901 (uri (list
902 (string-append
903 "http://linuxbrit.co.uk/downloads/giblib-"
904 version ".tar.gz")
905 (string-append
906 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
907 "files/giblib/giblib-" version ".tar.gz")))
f7d28082
AK
908 (sha256
909 (base32
910 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
911 (build-system gnu-build-system)
912 (inputs
913 `(("libx11" ,libx11)
914 ("imlib2" ,imlib2)))
915 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
916 (synopsis "Wrapper library for imlib2")
917 (description
35b9e423 918 "Giblib is a simple library which wraps imlib2's context API, avoiding
f7d28082
AK
919all the context_get/set calls, adds fontstyles to the truetype renderer and
920supplies a generic doubly-linked list and some string functions.")
921 ;; This license removes a clause about X Consortium from the original
922 ;; X11 license.
923 (license (license:x11-style "file://COPYING"
924 "See 'COPYING' in the distribution."))))
43402c5c
DT
925
926(define-public freeimage
927 (package
928 (name "freeimage")
8dc3c2a7 929 (version "3.18.0")
43402c5c
DT
930 (source (origin
931 (method url-fetch)
932 (uri (string-append
933 "mirror://sourceforge/freeimage/Source%20Distribution/"
934 version "/FreeImage"
bcc09d9a 935 (string-concatenate (string-split version #\.))
43402c5c
DT
936 ".zip"))
937 (sha256
938 (base32
8dc3c2a7 939 "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl"))
a5d4c96b
EF
940 (modules '((guix build utils)))
941 (snippet
942 '(begin
943 (for-each
944 (lambda (dir)
945 (delete-file-recursively (string-append "Source/" dir)))
f347c24a 946 '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
8dc3c2a7
KK
947 "LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
948 (patches (search-patches "freeimage-unbundle.patch"))))
43402c5c
DT
949 (build-system gnu-build-system)
950 (arguments
4a2798e0
EF
951 '(#:phases
952 (modify-phases %standard-phases
a5d4c96b
EF
953 ;; According to Fedora these files depend on private headers, but their
954 ;; presence is required for building, so we replace them with empty files.
955 (add-after 'unpack 'delete-unbuildable-files
956 (lambda _
957 (for-each (lambda (file)
958 (delete-file file)
959 (close (open file O_CREAT)))
960 '("Source/FreeImage/PluginG3.cpp"
961 "Source/FreeImageToolkit/JPEGTransform.cpp"))
962 #t))
963 ;; These scripts generate the Makefiles.
964 (replace 'configure
965 (lambda _
966 (invoke "sh" "gensrclist.sh")
967 (invoke "sh" "genfipsrclist.sh")))
4a2798e0
EF
968 (add-before 'build 'patch-makefile
969 (lambda* (#:key outputs #:allow-other-keys)
970 (substitute* "Makefile.gnu"
971 (("/usr") (assoc-ref outputs "out"))
972 (("-o root -g root") ""))
973 #t)))
a5d4c96b
EF
974 #:make-flags
975 (list "CC=gcc"
976 ;; We need '-fpermissive' for Source/FreeImage.h.
977 ;; libjxr doesn't have a pkg-config file.
978 (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive "
0fe041bd 979 "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib"))
43402c5c
DT
980 #:tests? #f)) ; no check target
981 (native-inputs
a5d4c96b
EF
982 `(("pkg-config" ,pkg-config)
983 ("unzip" ,unzip)))
984 (inputs
985 `(("libjpeg" ,libjpeg)
8dc3c2a7 986 ("libjxr" ,libjxr)
a5d4c96b
EF
987 ("libpng" ,libpng)
988 ("libraw" ,libraw)
989 ("libtiff" ,libtiff)
990 ("libwebp" ,libwebp)
991 ("openexr" ,openexr)
992 ("openjpeg" ,openjpeg)
993 ("zlib" ,zlib)))
43402c5c
DT
994 (synopsis "Library for handling popular graphics image formats")
995 (description
996 "FreeImage is a library for developers who would like to support popular
997graphics image formats like PNG, BMP, JPEG, TIFF and others.")
998 (license license:gpl2+)
999 (home-page "http://freeimage.sourceforge.net")))
97039f6e
AE
1000
1001(define-public vigra
019b3875
AE
1002 (package
1003 (name "vigra")
83273596 1004 (version "1.11.1")
019b3875
AE
1005 (source
1006 (origin
1007 (method url-fetch)
1008 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
83273596
MB
1009 "Version-" (string-join (string-split version #\.) "-")
1010 "/vigra-" version "-src.tar.gz"))
019b3875 1011 (sha256 (base32
83273596 1012 "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5"))))
019b3875
AE
1013 (build-system cmake-build-system)
1014 (inputs
1015 `(("boost" ,boost)
1016 ("fftw" ,fftw)
1017 ("fftwf" ,fftwf)
1018 ("hdf5" ,hdf5)
1019 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
1020 ; to create a configure-flag
1021 ("libjpeg" ,libjpeg)
1022 ("libpng" ,libpng)
1023 ("libtiff" ,libtiff)
1024 ("openexr" ,openexr)
1025 ("python" ,python-2) ; print syntax
1026 ("python2-numpy" ,python2-numpy)
1027 ("zlib" ,zlib)))
1028 (native-inputs
1029 `(("doxygen" ,doxygen)
1030 ("python2-nose" ,python2-nose)
556530c9 1031 ("sphinx" ,python-sphinx)))
019b3875
AE
1032 (arguments
1033 `(#:test-target "check"
e32db0fa
RW
1034 #:phases
1035 (modify-phases %standard-phases
43696990 1036 (add-after 'unpack 'disable-broken-tests
e32db0fa 1037 (lambda _
43696990 1038 ;; See https://github.com/ukoethe/vigra/issues/432
e32db0fa
RW
1039 (substitute* "test/fourier/CMakeLists.txt"
1040 (("VIGRA_ADD_TEST.*") ""))
43696990
MB
1041 ;; This test fails with Numpy 1.15:
1042 ;; <https://github.com/ukoethe/vigra/issues/436>.
1043 (substitute* "vigranumpy/test/CMakeLists.txt"
1044 (("test1\\.py") ""))
e32db0fa 1045 #t)))
019b3875
AE
1046 #:configure-flags
1047 (list "-Wno-dev" ; suppress developer mode with lots of warnings
1048 (string-append "-DVIGRANUMPY_INSTALL_DIR="
1049 (assoc-ref %outputs "out")
1050 "/lib/python2.7/site-packages")
1051 ;; OpenEXR is not enabled by default.
1052 "-DWITH_OPENEXR=1"
f803f775
LF
1053 ;; Fix rounding error on 32-bit machines
1054 "-DCMAKE_C_FLAGS=-ffloat-store"
019b3875
AE
1055 ;; The header files of ilmbase are not found when included
1056 ;; by the header files of openexr, and an explicit flag
1057 ;; needs to be set.
1058 (string-append "-DCMAKE_CXX_FLAGS=-I"
1059 (assoc-ref %build-inputs "ilmbase")
f803f775
LF
1060 "/include/OpenEXR"
1061 " -ffloat-store"))))
019b3875
AE
1062 (synopsis "Computer vision library")
1063 (description
1064 "VIGRA stands for Vision with Generic Algorithms. It is an image
97039f6e
AE
1065processing and analysis library that puts its main emphasis on customizable
1066algorithms and data structures. It is particularly strong for
1067multi-dimensional image processing.")
019b3875 1068 (license license:expat)
83273596 1069 (home-page "https://ukoethe.github.io/vigra/")))
060ad3de 1070
62813c10 1071(define-public vigra-c
4526bd07
RW
1072 (let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7")
1073 (revision "1"))
62813c10
FT
1074 (package
1075 (name "vigra-c")
4526bd07 1076 (version (git-version "0.0.0" revision commit))
62813c10
FT
1077 (home-page "https://github.com/BSeppke/vigra_c")
1078 (source (origin
1079 (method git-fetch)
1080 (uri (git-reference
1081 (url home-page)
1082 (commit commit)))
1083 (sha256
1084 (base32
4526bd07 1085 "1pnd92s284dvsg8zp6md7p8ck55bmcsryz58gzic7jh6m72hg689"))
62813c10
FT
1086 (file-name (git-file-name name version))))
1087 (build-system cmake-build-system)
1088 (arguments
1089 `(#:tests? #f)) ; No test target.
1090 (native-inputs
1091 `(("doxygen" ,doxygen)))
1092 (inputs
1093 `(("fftw" ,fftw)
1094 ("fftwf" ,fftwf)
4526bd07 1095 ("hdf5" ,hdf5)
62813c10
FT
1096 ("vigra" ,vigra)))
1097 (synopsis "C interface to the VIGRA computer vision library")
1098 (description
1099 "This package provides a C interface to the VIGRA C++ computer vision
1100library. It is designed primarily to ease the implementation of higher-level
1101language bindings to VIGRA.")
1102 (license license:expat))))
1103
060ad3de
TUBK
1104(define-public libwebp
1105 (package
1106 (name "libwebp")
7aad68f6 1107 (version "1.0.3")
060ad3de
TUBK
1108 (source
1109 (origin
b981f777
MB
1110 ;; No tarballs are provided for >0.6.1.
1111 (method git-fetch)
1112 (uri (git-reference
1113 (url "https://chromium.googlesource.com/webm/libwebp")
1114 (commit (string-append "v" version))))
1115 (file-name (git-file-name name version))
060ad3de 1116 (sha256
b2ed5ca7 1117 (base32
7aad68f6 1118 "1l8h9d3z3kla567ilmymrgg8vc2n763g8qss1hah8dg832hbqkxf"))))
060ad3de
TUBK
1119 (build-system gnu-build-system)
1120 (inputs
1121 `(("freeglut" ,freeglut)
1122 ("giflib" ,giflib)
1123 ("libjpeg" ,libjpeg)
1124 ("libpng" ,libpng)
1125 ("libtiff" ,libtiff)))
b981f777
MB
1126 (native-inputs
1127 `(("autoconf" ,autoconf)
1128 ("automake" ,automake)
1129 ("libtool" ,libtool)))
060ad3de
TUBK
1130 (arguments
1131 '(#:configure-flags '("--enable-libwebpmux"
1132 "--enable-libwebpdemux"
b981f777
MB
1133 "--enable-libwebpdecoder")
1134 #:phases (modify-phases %standard-phases
1135 (add-after 'unpack 'bootstrap
1136 (lambda _
1137 (invoke "autoreconf" "-vif"))))))
060ad3de
TUBK
1138 (home-page "https://developers.google.com/speed/webp/")
1139 (synopsis "Lossless and lossy image compression")
1140 (description
1141 "WebP is a new image format that provides lossless and lossy compression
1eefe4a8
LC
1142for images. WebP lossless images are 26% smaller in size compared to
1143PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
1144equivalent SSIM index. WebP supports lossless transparency (also known as
1145alpha channel) with just 22% additional bytes. Transparency is also supported
060ad3de
TUBK
1146with lossy compression and typically provides 3x smaller file sizes compared
1147to PNG when lossy compression is acceptable for the red/green/blue color
1148channels.")
1149 (license license:bsd-3)))
b9ecd5ae
SB
1150
1151(define-public libmng
1152 (package
1153 (name "libmng")
1154 (version "2.0.3")
1155 (source (origin
1156 (method url-fetch)
0f971a04
LF
1157 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
1158 version "/" name "-" version ".tar.xz"))
b9ecd5ae
SB
1159 (sha256
1160 (base32
1161 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
1162 (build-system gnu-build-system)
1163 (propagated-inputs
1164 ;; These are all in the 'Libs.private' field of libmng.pc.
1165 `(("lcms" ,lcms)
1166 ("libjpeg" ,libjpeg)
1167 ("zlib" ,zlib)))
1168 (home-page "http://www.libmng.com/")
1169 (synopsis "Library for handling MNG files")
1170 (description
1171 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
1172 (license license:bsd-3)))
3aab2c83 1173
023f0fb0
AK
1174(define-public exiv2
1175 (package
1176 (name "exiv2")
febbe431 1177 (version "0.27.2")
0e1c5ccc
TGR
1178 (source
1179 (origin
1180 (method url-fetch)
1181 (uri (string-append "https://www.exiv2.org/builds/exiv2-" version
1182 "-Source.tar.gz"))
1183 (sha256
febbe431 1184 (base32 "0gqminvj14xm3rgbnydbywf22608js80rp7nmxxk4497j5mzali6"))))
0e1c5ccc
TGR
1185 (build-system cmake-build-system)
1186 (arguments '(#:tests? #f)) ; no test suite
023f0fb0
AK
1187 (propagated-inputs
1188 `(("expat" ,expat)
1189 ("zlib" ,zlib)))
993d8164 1190 (home-page "https://www.exiv2.org/")
023f0fb0
AK
1191 (synopsis "Library and command-line utility to manage image metadata")
1192 (description
1193 "Exiv2 is a C++ library and a command line utility to manage image
1194metadata. It provides fast and easy read and write access to the Exif, IPTC
1195and XMP metadata of images in various formats.")
1196
1197 ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
1198 ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
1199 ;; The core is GPLv2+:
1200 ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
1201 (license license:gpl2+)))
1202
eafd0390
LC
1203(define-public exiv2-0.26
1204 (package
1205 (inherit exiv2)
1206 (version "0.26")
1207 (source (origin
1208 (method url-fetch)
1209 (uri (list (string-append "https://www.exiv2.org/builds/exiv2-"
1210 version "-trunk.tar.gz")
1211 (string-append "https://www.exiv2.org/exiv2-"
1212 version ".tar.gz")
1213 (string-append "https://fossies.org/linux/misc/exiv2-"
1214 version ".tar.gz")))
1215 (patches (search-patches "exiv2-CVE-2017-14860.patch"
1216 "exiv2-CVE-2017-14859-14862-14864.patch"))
1217 (sha256
1218 (base32
1219 "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7"))))
1220 (build-system gnu-build-system)
1221 (arguments '(#:tests? #f)) ; no `check' target
1222 (propagated-inputs
1223 `(("expat" ,expat)
1224 ("zlib" ,zlib)))
1225 (native-inputs
1226 `(("intltool" ,intltool)))
1227
1228 ;; People should rely on the newer version, so don't expose it.
1229 (properties `((hidden? . #t)))))
1230
3aab2c83
DT
1231(define-public devil
1232 (package
1233 (name "devil")
77ab6983 1234 (version "1.8.0")
3aab2c83
DT
1235 (source (origin
1236 (method url-fetch)
1237 (uri (string-append "http://downloads.sourceforge.net/openil/"
1238 "DevIL-" version ".tar.gz"))
1239 (sha256
1240 (base32
77ab6983
MB
1241 "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80"))))
1242 (build-system cmake-build-system)
3aab2c83 1243 (arguments
77ab6983
MB
1244 '(;; XXX: Not supported in the released CMakeLists.txt.
1245 ;; Enable this for > 1.8.0.
1246 #:tests? #f
3aab2c83
DT
1247 #:phases
1248 (modify-phases %standard-phases
77ab6983
MB
1249 (add-before 'configure 'change-directory
1250 (lambda _ (chdir "DevIL") #t)))))
3aab2c83
DT
1251 (native-inputs
1252 `(("pkg-config" ,pkg-config)))
1253 (inputs
1254 `(("lcms" ,lcms)
77ab6983 1255 ("libjpeg" ,libjpeg-turbo)
3aab2c83
DT
1256 ("libmng" ,libmng)
1257 ("libpng" ,libpng)
1258 ("libtiff" ,libtiff)
1259 ("openexr" ,openexr)
1260 ("zlib" ,zlib)))
1261 (synopsis "Library for manipulating many image formats")
1262 (description "Developer's Image Library (DevIL) is a library to develop
1263applications with support for many types of images. DevIL can load, save,
1264convert, manipulate, filter and display a wide variety of image formats.")
1265 (home-page "http://openil.sourceforge.net")
1266 (license license:lgpl2.1+)))
b0b23e52
DT
1267
1268(define-public jasper
1269 (package
1270 (name "jasper")
8cc3983a 1271 (version "2.0.16")
b0b23e52 1272 (source (origin
d57b017c
RW
1273 (method git-fetch)
1274 (uri (git-reference
1275 (url "https://github.com/mdadams/jasper.git")
1276 (commit (string-append "version-" version))))
1277 (file-name (git-file-name name version))
b0b23e52
DT
1278 (sha256
1279 (base32
8cc3983a 1280 "05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6"))))
c7a70c33 1281 (build-system cmake-build-system)
d87c201f 1282 (inputs `(("libjpeg" ,libjpeg)))
b0b23e52
DT
1283 (synopsis "JPEG-2000 library")
1284 (description "The JasPer Project is an initiative to provide a reference
1285implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
1286ISO/IEC 15444-1).")
1287 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
1288 (license (license:x11-style "file://LICENSE"))))
365a4a7f
EF
1289
1290(define-public zimg
1291 (package
1292 (name "zimg")
4120e6e0 1293 (version "2.9.2")
365a4a7f
EF
1294 (source
1295 (origin
ba185e2a
RW
1296 (method git-fetch)
1297 (uri (git-reference
1298 (url "https://github.com/sekrit-twc/zimg.git")
1299 (commit (string-append "release-" version))))
1300 (file-name (git-file-name name version))
365a4a7f 1301 (sha256
4120e6e0 1302 (base32 "0jlgrlfs9maixd8mx7gk2kfawz8ixnihkxi7vhyzfy1gq49vmxm2"))))
365a4a7f
EF
1303 (build-system gnu-build-system)
1304 (native-inputs
1305 `(("autoconf" ,autoconf)
1306 ("automake" ,automake)
1307 ("libtool" ,libtool)))
365a4a7f
EF
1308 (synopsis "Scaling, colorspace conversion, and dithering library")
1309 (description "Zimg implements the commonly required image processing basics
1310of scaling, colorspace conversion, and depth conversion. A simple API enables
1311conversion between any supported formats to operate with minimal knowledge from
1312the programmer.")
1313 (home-page "https://github.com/sekrit-twc/zimg")
8ee04627 1314 ;; test/extra/ contains musl-libm,
365a4a7f 1315 ;; which is MIT/expat licensed, but only used for tests
f62e7ce4 1316 (license license:wtfpl2)))
af7aaaeb
TGR
1317
1318(define-public perceptualdiff
1319 (package
1320 (name "perceptualdiff")
1321 (version "1.3")
1322 (source
1323 (origin
be59c48d
TGR
1324 (method git-fetch)
1325 (uri (git-reference
1326 (url "https://github.com/myint/perceptualdiff.git")
1327 (commit (string-append "v" version))))
1328 (file-name (git-file-name name version))
1329 (sha256
1330 (base32 "0yys55f9i9g3wjjg0j2m0p0k21zwnid8520a8lrr30khm4k5gibp"))))
af7aaaeb
TGR
1331 (build-system cmake-build-system)
1332 (inputs `(("freeimage" ,freeimage)))
1333 (arguments
1334 '(#:phases (modify-phases %standard-phases
1335 (add-after 'unpack 'fix-tests
1336 ;; cmake-build-system uses a build/ directory outside
1337 ;; of the source tree, one level higher than expected
1338 (lambda _
1339 (substitute* "test/run_tests.bash"
fccacffb
MW
1340 (("../build") "../../build"))
1341 #t)))))
af7aaaeb
TGR
1342 (home-page "https://github.com/myint/perceptualdiff")
1343 (synopsis "Perceptual image comparison utility")
1344 (description "PerceptualDiff visually compares two images to determine
1345whether they look alike. It uses a computational model of the human visual
1346system to detect similarities. This allows it too see beyond irrelevant
1347differences in file encoding, image quality, and other small variations.")
1348 (license license:gpl2+)))
1fa3e336
EB
1349
1350(define-public steghide
1351 (package
1352 (name "steghide")
1353 (version "0.5.1")
1354 (source (origin
1355 (method url-fetch)
1356 (uri (string-append "mirror://sourceforge/steghide/steghide/"
1357 version "/steghide-" version ".tar.bz2"))
1358 (sha256
1359 (base32
1360 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
1361 (patches (list (search-patch "steghide-fixes.patch")))))
1362 (build-system gnu-build-system)
1363 (native-inputs
7c90d0f4 1364 `(("gettext" ,gettext-minimal)
1fa3e336
EB
1365 ("libtool" ,libtool)
1366 ("perl" ,perl))) ;for tests
1367 (inputs
1368 `(("libmhash" ,libmhash)
1369 ("libmcrypt" ,libmcrypt)
1370 ("libjpeg" ,libjpeg)
1371 ("zlib" ,zlib)))
1372 (arguments
a56bf101
LC
1373 `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc
1374
1375 #:phases (modify-phases %standard-phases
1376 (add-before 'configure 'set-perl-search-path
1377 (lambda _
1378 ;; Work around "dotless @INC" build failure.
1379 (setenv "PERL5LIB"
1380 (string-append (getcwd) "/tests:"
1381 (getenv "PERL5LIB")))
1382 #t)))))
1fa3e336
EB
1383 (home-page "http://steghide.sourceforge.net")
1384 (synopsis "Image and audio steganography")
1385 (description
7832785d
TGR
1386 "Steghide is a program to hide data in various kinds of image and audio
1387files (known as @dfn{steganography}). Neither color nor sample frequencies are
1388changed, making the embedding resistant against first-order statistical tests.")
1fa3e336 1389 (license license:gpl2+)))
ac2a38a5
RW
1390
1391(define-public stb-image-for-extempore
1392 (let ((revision "1")
1393 (commit "152a250a702bf28951bb0220d63bc0c99830c498"))
1394 (package
1395 (name "stb-image-for-extempore")
1396 (version (string-append "0-" revision "." (string-take commit 9)))
1397 (source
1398 (origin (method git-fetch)
1399 (uri (git-reference
1400 (url "https://github.com/extemporelang/stb.git")
1401 (commit commit)))
1402 (sha256
1403 (base32
1404 "0y0aa20pj9311x2ii06zg8xs34idg14hfgldqc5ymizc6cf1qiqv"))
1405 (file-name (string-append name "-" version "-checkout"))))
1406 (build-system cmake-build-system)
1407 (arguments `(#:tests? #f)) ; no tests included
39162ee4
RW
1408 ;; Extempore refuses to build on architectures other than x86_64
1409 (supported-systems '("x86_64-linux"))
ac2a38a5
RW
1410 (home-page "https://github.com/extemporelang/stb")
1411 (synopsis "Image library for Extempore")
1412 (description
1413 "This package is a collection of assorted single-file libraries. Of
1414all included libraries only the image loading and decoding library is
1415installed as @code{stb_image}.")
1416 (license license:public-domain))))
93117227
AI
1417
1418(define-public optipng
1419 (package
1420 (name "optipng")
bbf8832f 1421 (version "0.7.7")
93117227
AI
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
1426 version ".tar.gz"))
1427 (sha256
1428 (base32
64ed4b6a
EF
1429 "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg"))
1430 (modules '((guix build utils)))
1431 (snippet
1432 '(begin
1433 (delete-file-recursively "src/libpng")
1434 (delete-file-recursively "src/zlib")
1435 #t))))
93117227
AI
1436 (build-system gnu-build-system)
1437 (inputs
64ed4b6a
EF
1438 `(("libpng" ,libpng)
1439 ("zlib" ,zlib)))
93117227
AI
1440 (arguments
1441 '(#:phases
1442 (modify-phases %standard-phases
93117227
AI
1443 (replace 'configure
1444 (lambda* (#:key outputs #:allow-other-keys)
bbf8832f
TGR
1445 ;; configure script doesn't accept arguments CONFIG_SHELL and SHELL
1446 (invoke "sh" "configure"
64ed4b6a
EF
1447 (string-append "--prefix=" (assoc-ref outputs "out"))
1448 "-with-system-libs")
bbf8832f
TGR
1449 #t)))))
1450 (synopsis "Optimizer that recompresses PNG image files to a smaller size")
93117227
AI
1451 (description "OptiPNG is a PNG optimizer that recompresses image
1452files to a smaller size, without losing any information. This program
1453also converts external formats (BMP, GIF, PNM and TIFF) to optimized
1454PNG, and performs PNG integrity checks and corrections.")
1455 (home-page "http://optipng.sourceforge.net/")
1456 (license license:zlib)))
37e05d64 1457
68fea604
VC
1458(define-public pngsuite
1459 (package
1460 (name "pngsuite")
1461 (version "2017jul19")
1462 (source
1463 (origin
1464 (method url-fetch/tarbomb)
1465 (uri (string-append "http://www.schaik.com/pngsuite2011/PngSuite-"
1466 version ".tgz"))
1467 (sha256
1468 (base32
1469 "1j7xgd9iffcnpphhzz9ld9ybrjmx9brhq0803g0450ssr52b5502"))))
1470 (build-system gnu-build-system)
1471 (arguments
1472 '(#:tests? #f ; there is no test target
1473 #:license-file-regexp "PngSuite.LICENSE"
1474 #:phases
1475 (modify-phases %standard-phases
1476 (replace 'install
1477 (lambda* (#:key outputs #:allow-other-keys)
1478 (let ((out (assoc-ref outputs "out")))
1479 (copy-recursively "." (string-append out "/"))
1480 #t)))
1481 (delete 'build)
1482 (delete 'configure))))
1483 (home-page "http://www.schaik.com/pngsuite2011/pngsuite.html")
1484 (synopsis "Example PNGs for use in test suites")
1485 (description "Collection of graphics images created to test PNG
1486applications like viewers, converters and editors. As far as that is
1487possible, all formats supported by the PNG standard are represented.")
1488 (license (license:fsdg-compatible "file://PngSuite.LICENSE" "Permission to
1489use, copy, modify and distribute these images for any purpose and without fee
1490is hereby granted."))))
1491
37e05d64
TGR
1492(define-public libjpeg-turbo
1493 (package
1494 (name "libjpeg-turbo")
9b070277 1495 (version "2.0.2")
37e05d64
TGR
1496 (source (origin
1497 (method url-fetch)
ec92d786
MB
1498 (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
1499 version "/libjpeg-turbo-" version ".tar.gz"))
37e05d64
TGR
1500 (sha256
1501 (base32
9b070277 1502 "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c"))))
6871121b 1503 (build-system cmake-build-system)
37e05d64
TGR
1504 (native-inputs
1505 `(("nasm" ,nasm)))
1506 (arguments
6871121b
MB
1507 '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
1508 "-DENABLE_STATIC=0")))
a77de47a 1509 (home-page "https://libjpeg-turbo.org/")
37e05d64
TGR
1510 (synopsis "SIMD-accelerated JPEG image handling library")
1511 (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
1512JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
1513x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems,
1514its highly-optimized Huffman coding routines allow it to outperform libjpeg by
1515a significant amount.
1516libjpeg-turbo implements both the traditional libjpeg API and the less powerful
1517but more straightforward TurboJPEG API, and provides a full-featured Java
1518interface. It supports color space extensions that allow it to compress from
1519and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
71de61c3
MB
1520 ;; libjpeg-turbo is covered by three different licenses; see LICENSE.md.
1521 (license (list license:bsd-3 ;the TurboJPEG API library and programs
1522 license:ijg ;the libjpeg library and associated tools
1523 license:zlib)))) ;the libjpeg-turbo SIMD extensions
21122bd7
JD
1524
1525(define-public niftilib
1526 (package
f729a4d8
RW
1527 (name "niftilib")
1528 (version "2.0.0")
1529 (source (origin
1530 (method url-fetch)
1531 (uri (list (string-append "mirror://sourceforge/niftilib/"
1532 "nifticlib/nifticlib_"
1533 (string-join (string-split version #\.) "_")
1534 "/nifticlib-" version ".tar.gz")))
1535 (sha256
1536 (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
1537 (build-system gnu-build-system)
1538 (arguments
1539 '(#:tests? #f ; there is no test target
1540 #:parallel-build? #f ; not supported
1541 #:make-flags
1542 (list "SHELL=bash"
1543 (string-append "ZLIB_INC="
1544 (assoc-ref %build-inputs "zlib") "/include")
1545 ;; Append "-fPIC" to CFLAGS.
1546 (string-append "CFLAGS="
1547 "-Wall -ansi -pedantic -fPIC"))
1548 #:phases
1549 (modify-phases %standard-phases
1550 (replace 'install
1551 (lambda* (#:key outputs #:allow-other-keys)
1552 (let ((out (assoc-ref outputs "out")))
1553 (for-each
1554 (lambda (dir)
1555 (copy-recursively dir (string-append out "/" dir)))
1556 '("bin" "lib" "include")))
1557 #t))
1558 (delete 'configure))))
1559 (inputs
1560 `(("zlib" ,zlib)))
1561 (synopsis "Library for reading and writing files in the nifti-1 format")
1562 (description "Niftilib is a set of i/o libraries for reading and writing
21122bd7
JD
1563files in the nifti-1 data format - a binary file format for storing
1564medical image data, e.g. magnetic resonance image (MRI) and functional MRI
1565(fMRI) brain images.")
f729a4d8
RW
1566 (home-page "http://niftilib.sourceforge.net")
1567 (license license:public-domain)))
f2079849
JL
1568
1569(define-public gpick
1570 (package
1571 (name "gpick")
1572 (version "0.2.5")
1573 (source (origin
94be94cf
RW
1574 (method git-fetch)
1575 (uri (git-reference
1576 (url "https://github.com/thezbyg/gpick.git")
1577 (commit (string-append name "-" version))))
1578 (file-name (git-file-name name version))
f2079849
JL
1579 (sha256
1580 (base32
94be94cf 1581 "0mcj806zagh122qgrdkrg0macpzby97y89xi2sjyn3bh8vmmyxjy"))))
2235abb2 1582 (build-system scons-build-system)
f2079849
JL
1583 (native-inputs
1584 `(("boost" ,boost)
1585 ("gettext" ,gnu-gettext)
2235abb2 1586 ("pkg-config" ,pkg-config)))
f2079849
JL
1587 (inputs
1588 `(("expat" ,expat)
1589 ("gtk2" ,gtk+-2)
1590 ("lua" ,lua-5.2)))
1591 (arguments
1592 `(#:tests? #f
2235abb2
AI
1593 #:scons ,scons-python2
1594 #:scons-flags (list (string-append "DESTDIR=" %output))
f2079849
JL
1595 #:phases
1596 (modify-phases %standard-phases
1597 (add-before 'build 'fix-lua-reference
1598 (lambda _
1599 (substitute* "SConscript"
1600 (("lua5.2") "lua-5.2"))
2235abb2 1601 #t)))))
f2079849
JL
1602 (home-page "http://www.gpick.org/")
1603 (synopsis "Color picker")
1604 (description "Gpick is an advanced color picker and palette editing tool.")
1605 (license license:bsd-3)))
bc806b0c
LF
1606
1607(define-public libiptcdata
1608 (package
1609 (name "libiptcdata")
a42b6848 1610 (version "1.0.5")
bc806b0c
LF
1611 (source (origin
1612 (method url-fetch)
a42b6848
TGR
1613 (uri (string-append "https://github.com/ianw/libiptcdata"
1614 "/releases/download/release_"
1615 (string-join (string-split version #\.) "_")
1616 "/" name "-" version ".tar.gz"))
bc806b0c
LF
1617 (sha256
1618 (base32
a42b6848 1619 "17m2bscc76r1bymjgb44fbbfrdsjfqyb2ivg9wchyllm8pgx1560"))))
bc806b0c 1620 (build-system gnu-build-system)
a42b6848 1621 (home-page "https://github.com/ianw/libiptcdata")
bc806b0c 1622 (synopsis "IPTC metadata manipulation library")
a09a2119
TGR
1623 (description
1624 "Libiptcdata is a C library for manipulating the International Press
1625Telecommunications Council (@dfn{IPTC}) metadata stored within multimedia files
bc806b0c
LF
1626such as images. This metadata can include captions and keywords, often used by
1627popular photo management applications. The library provides routines for
1628parsing, viewing, modifying, and saving this metadata.")
1629 (license license:lgpl2.0+)))
84567657
OP
1630
1631(define-public flameshot
1632 (package
1633 (name "flameshot")
1634 (version "0.5.1")
1635 (source
1636 (origin
743600e9
RW
1637 (method git-fetch)
1638 (uri (git-reference
1639 (url "https://github.com/lupoDharkael/flameshot.git")
1640 (commit (string-append "v" version))))
1641 (file-name (git-file-name name version))
84567657
OP
1642 (sha256
1643 (base32
743600e9 1644 "13h77np93r796jf289v4r687cmnpqkyqs34dm9gif4akaig74ky0"))))
84567657
OP
1645 (build-system gnu-build-system)
1646 (native-inputs
1647 `(("qttools" ,qttools)))
1648 (inputs
1649 `(("qtbase" ,qtbase)))
1650 (arguments
1651 `(#:tests? #f ; no tests
1652 #:phases
1653 (modify-phases %standard-phases
1654 (replace 'configure
1655 (lambda* (#:key outputs #:allow-other-keys)
1656 (invoke "qmake"
1657 "CONFIG+=packaging"
1658 (string-append "BASEDIR=" (assoc-ref outputs "out"))
1659 "PREFIX=/"))))))
1660 (home-page "https://github.com/lupoDharkael/flameshot")
1661 (synopsis "Powerful yet simple to use screenshot software")
1662 (description "Flameshot is a screenshot program.
1663Features:
1664
1665@itemize
1666@item Customizable appearance.
1667@item Easy to use.
1668@item In-app screenshot edition.
1669@item DBus interface.
1670@item Upload to Imgur.
1671@end itemize\n")
1672 (license license:gpl3+)))
da4dde61 1673
0d529a7c
PN
1674(define-public gifsicle
1675 (package
1676 (name "gifsicle")
5c46e1dd 1677 (version "1.92")
0d529a7c
PN
1678 (source
1679 (origin
1680 (method url-fetch)
645b6c7f 1681 (uri (string-append "https://www.lcdf.org/gifsicle/gifsicle-"
0d529a7c
PN
1682 version ".tar.gz"))
1683 (sha256
5c46e1dd 1684 (base32 "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas"))))
0d529a7c
PN
1685 (build-system gnu-build-system)
1686 (arguments
1687 '(#:phases
1688 (modify-phases %standard-phases
1689 (add-before 'check 'patch-tests
1690 (lambda _
1691 (substitute* "test/testie"
1692 (("/usr/bin/perl")
1693 (which "perl"))
1694 (("/bin/sh")
1695 (which "sh"))
1696 (("/bin/rm")
1697 (which "rm")))
1698 #t)))))
5c46e1dd 1699 (native-inputs `(("perl" ,perl))) ; only for tests
0d529a7c 1700 (inputs `(("libx11" ,libx11)))
645b6c7f 1701 (home-page "https://www.lcdf.org/gifsicle/")
0d529a7c
PN
1702 (synopsis "Edit GIF images and animations")
1703 (description "Gifsicle is a command-line GIF image manipulation tool that:
1704
1705@itemize
1706@item Provides a batch mode for changing GIFs in place.
1707@item Prints detailed information about GIFs, including comments.
1708@item Control over interlacing, comments, looping, transparency, etc.
1709@item Creates well-behaved GIFs: removes redundant colors, only uses local color
1710tables, etc.
1711@item Shrinks colormaps and change images to use the Web-safe palette.
1712@item Optimizes GIF animations, or unoptimizes them for easier editing.
1713@end itemize
1714
1715Two other programs are included with Gifsicle: @command{gifview} is a
1716lightweight animated-GIF viewer, and @command{gifdiff} compares two GIFs for
1717identical visual appearance.")
1718 (license license:gpl2+)))
3239dcd3 1719
dc7e5783 1720;; 1.0.7 is buggy and reverted in git repository.
3239dcd3
PAR
1721(define-public jp2a
1722 (package
1723 (name "jp2a")
dc7e5783 1724 (version "1.0.6")
3239dcd3
PAR
1725 (source
1726 (origin
dc7e5783
EF
1727 (method url-fetch)
1728 (uri (string-append "mirror://debian/pool/main/j/jp2a/jp2a_"
1729 version ".orig.tar.gz"))
1730 (sha256
1731 (base32
1732 "076frk3pa16s4r1b10zgy81vdlz0385zh3ykbnkaij25jn5aqc09"))))
3239dcd3
PAR
1733 (build-system gnu-build-system)
1734 (inputs
dc7e5783
EF
1735 `(("curl" ,curl)
1736 ("libjpeg" ,libjpeg)
1737 ("ncurses" ,ncurses)))
3239dcd3
PAR
1738 (home-page "https://csl.name/jp2a/")
1739 (synopsis "Convert JPEG images to ASCII")
1740 (description
1741 "Jp2a is a small utility that converts JPEG images to ASCII.")
1742 (license license:gpl2)))
0290f533
RH
1743
1744(define-public grim
1745 (package
444c4c08 1746 (name "grim")
501d4b33 1747 (version "1.2.0")
444c4c08
RH
1748 (source
1749 (origin
90c7ea44
TGR
1750 (method git-fetch)
1751 (uri (git-reference
1752 (url "https://github.com/emersion/grim.git")
1753 (commit (string-append "v" version))))
1754 (file-name (git-file-name name version))
444c4c08 1755 (sha256
501d4b33 1756 (base32 "0brljl4zfbn5mh9hkfrfkvd27c5y9vdkgap9r1hrfy9r1x20sskn"))))
444c4c08
RH
1757 (build-system meson-build-system)
1758 (native-inputs `(("pkg-config" ,pkg-config)))
1759 (inputs `(("cairo" ,cairo)
1760 ("libjpeg-turbo" ,libjpeg-turbo)
1761 ("scdoc" ,scdoc)
1762 ("wayland" ,wayland)
1763 ("wayland-protocols" ,wayland-protocols)))
1764 (home-page "https://github.com/emersion/grim")
1765 (synopsis "Create screenshots from a Wayland compositor")
1766 (description "grim can create screenshots from a Wayland compositor.")
1767 ;; MIT license.
1768 (license license:expat)))
bd86a1be
RH
1769
1770(define-public slurp
1771 (package
1772 (name "slurp")
7d5113e5 1773 (version "1.2.0")
bd86a1be
RH
1774 (source
1775 (origin
1776 (method git-fetch)
1777 (uri (git-reference
1778 (url "https://github.com/emersion/slurp.git")
1779 (commit (string-append "v" version))))
1780 (file-name (git-file-name name version))
1781 (sha256
7d5113e5 1782 (base32 "0580m6kaiilgsrcj608r837r37sl6a25y7w21p7d6ij20fs3gvg1"))))
bd86a1be
RH
1783 (build-system meson-build-system)
1784 (native-inputs `(("pkg-config" ,pkg-config)))
1785 (inputs `(("cairo" ,cairo)
1786 ("scdoc" ,scdoc)
1787 ("wayland" ,wayland)
1788 ("wayland-protocols" ,wayland-protocols)))
1789 (home-page "https://github.com/emersion/slurp")
1790 (synopsis "Select a region in a Wayland compositor")
1791 (description "Slurp can select a region in a Wayland compositor and print it
1792to the standard output. It works well together with grim.")
1793 ;; MIT license.
1794 (license license:expat)))
d54ca1cd
VC
1795
1796(define-public sng
1797 (package
1798 (name "sng")
1799 (version "1.1.0")
1800 (source
1801 (origin
1802 (method url-fetch)
1803 (uri (string-append "mirror://sourceforge/sng/sng-"
1804 version ".tar.gz"))
1805 (sha256
1806 (base32 "06a6ydvx9xb3vxvrzdrg3hq0rjwwj9ibr7fyyxjxq6qx1j3mb70i"))))
1807 (build-system gnu-build-system)
1808 (arguments
1809 `(#:phases
1810 (modify-phases %standard-phases
1811 (add-before 'check 'link-pngsuite
1812 ;; tests expect pngsuite in source dir
1813 (lambda* (#:key inputs #:allow-other-keys)
1814 (symlink (assoc-ref inputs "pngsuite") "pngsuite")
1815 #t)))
1816 #:configure-flags
1817 (list (string-append "--with-rgbtxt="
1818 (assoc-ref %build-inputs "xorg-rgb")
1819 "/share/X11/rgb.txt"))))
1820 (inputs `(("xorg-rgb" ,xorg-rgb)
1821 ("libpng" ,libpng)))
1822 (native-inputs `(("pngsuite" ,pngsuite)))
1823 (home-page "http://sng.sourceforge.net")
1824 (synopsis "Markup language for representing PNG contents")
1825 (description "SNG (Scriptable Network Graphics) is a minilanguage designed
1826specifically to represent the entire contents of a PNG (Portable Network
1827Graphics) file in an editable form. Thus, SNGs representing elaborate
1828graphics images and ancillary chunk data can be readily generated or modified
1829using only text tools.
1830
1831SNG is implemented by a compiler/decompiler called sng that
1832losslessly translates between SNG and PNG.")
1833 (license license:zlib)))