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