Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / image.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2014, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
9 ;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
10 ;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
13 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
15 ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
16 ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
17 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
18 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
19 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
20 ;;;
21 ;;; This file is part of GNU Guix.
22 ;;;
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
27 ;;;
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
32 ;;;
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36 (define-module (gnu packages image)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages algebra)
39 #:use-module (gnu packages assembly)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages fontutils)
46 ;; To provide gcc@5 and gcc@6, to work around <http://bugs.gnu.org/24703>.
47 #:use-module (gnu packages gcc)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages ghostscript)
50 #:use-module (gnu packages gl)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages graphics)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages lua)
55 #:use-module (gnu packages maths)
56 #:use-module (gnu packages mcrypt)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages photo)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages xml)
62 #:use-module (gnu packages xorg)
63 #:use-module (gnu packages qt)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (guix packages)
66 #:use-module (guix download)
67 #:use-module (guix git-download)
68 #:use-module (guix build-system gnu)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system r)
72 #:use-module (guix build-system scons)
73 #:use-module (srfi srfi-1))
74
75 (define-public libpng
76 (package
77 (name "libpng")
78 (version "1.6.34")
79 (source (origin
80 (method url-fetch)
81 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
82 version "/libpng-" version ".tar.xz")
83 (string-append
84 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
85 "/libpng16/libpng-" version ".tar.xz")
86 (string-append
87 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
88 "/libpng16/libpng-" version ".tar.xz")))
89 (sha256
90 (base32
91 "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig"))))
92 (build-system gnu-build-system)
93
94 ;; libpng.la says "-lz", so propagate it.
95 (propagated-inputs `(("zlib" ,zlib)))
96
97 (synopsis "Library for handling PNG files")
98 (description
99 "Libpng is the official PNG (Portable Network Graphics) reference
100 library. It supports almost all PNG features and is extensible.")
101 (license license:zlib)
102 (home-page "http://www.libpng.org/pub/png/libpng.html")))
103
104 ;; libpng-apng should be updated when the APNG patch is released:
105 ;; <https://bugs.gnu.org/27556>
106 (define-public libpng-apng
107 (package
108 (name "libpng-apng")
109 (version "1.6.28")
110 (source
111 (origin
112 (method url-fetch)
113 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
114 version "/libpng-" version ".tar.xz")
115 (string-append
116 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
117 "/libpng16/libpng-" version ".tar.xz")
118 (string-append
119 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
120 "/libpng16/libpng-" version ".tar.xz")))
121 (sha256
122 (base32
123 "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq"))))
124 (build-system gnu-build-system)
125 (arguments
126 `(#:modules ((guix build gnu-build-system)
127 (guix build utils)
128 (srfi srfi-1))
129 #:phases
130 (modify-phases %standard-phases
131 (add-after 'unpack 'patch-apng
132 (lambda* (#:key inputs #:allow-other-keys)
133 (define (apply-patch file)
134 (zero? (system* "patch" "-p1" "--force"
135 "--input" file)))
136 (let ((apng.gz (assoc-ref inputs "apng")))
137 (format #t "Applying APNG patch '~a'...~%"
138 apng.gz)
139 (and
140 (zero?
141 (system (string-append "gunzip < " apng.gz " > the-patch")))
142 (apply-patch "the-patch")))))
143 (add-before 'configure 'no-checks
144 (lambda _
145 (substitute* "Makefile.in"
146 (("^scripts/symbols.chk") "")
147 (("check: scripts/symbols.chk") ""))
148 #t)))))
149 (inputs
150 `(("apng" ,(origin
151 (method url-fetch)
152 (uri
153 (string-append "mirror://sourceforge/libpng-apng/libpng16/"
154 version "/libpng-" version "-apng.patch.gz"))
155 (sha256
156 (base32
157 "0m5nv70n9903x3xzxw9qqc6sgf2rp106ha0x6gix0xf8wcrljaab"))))))
158 (native-inputs
159 `(("libtool" ,libtool)))
160 ;; libpng.la says "-lz", so propagate it.
161 (propagated-inputs
162 `(("zlib" ,zlib)))
163 (synopsis "APNG patch for libpng")
164 (description
165 "APNG (Animated Portable Network Graphics) is an unofficial
166 extension of the APNG (Portable Network Graphics) format.
167 APNG patch provides APNG support to libpng.")
168 (home-page "https://sourceforge.net/projects/libpng-apng/")
169 (license license:zlib)))
170
171 (define-public libpng-1.2
172 (package
173 (inherit libpng)
174 (version "1.2.59")
175 (source
176 (origin
177 (method url-fetch)
178 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
179 version "/libpng-" version ".tar.xz")
180 (string-append
181 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
182 "/libpng12/libpng-" version ".tar.xz")
183 (string-append
184 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
185 "/libpng12/libpng-" version ".tar.xz")))
186 (sha256
187 (base32
188 "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl"))))))
189
190 (define-public r-png
191 (package
192 (name "r-png")
193 (version "0.1-7")
194 (source (origin
195 (method url-fetch)
196 (uri (cran-uri "png" version))
197 (sha256
198 (base32
199 "0g2mcp55lvvpx4kd3mn225mpbxqcq73wy5qx8b4lyf04iybgysg2"))))
200 (build-system r-build-system)
201 (inputs
202 `(("libpng" ,libpng)
203 ("zlib" ,zlib)))
204 (home-page "http://www.rforge.net/png/")
205 (synopsis "Read and write PNG images")
206 (description
207 "This package provides an easy and simple way to read, write and display
208 bitmap images stored in the PNG format. It can read and write both files and
209 in-memory raw vectors.")
210 ;; Any of these GPL versions.
211 (license (list license:gpl2 license:gpl3))))
212
213 (define-public pngcrush
214 (package
215 (name "pngcrush")
216 (version "1.8.13")
217 (source (origin
218 (method url-fetch)
219 (uri (string-append "mirror://sourceforge/pmt/pngcrush/"
220 version "/pngcrush-" version "-nolib.tar.xz"))
221 (sha256 (base32
222 "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv"))))
223 (build-system gnu-build-system)
224 (arguments
225 '(#:tests? #f ; no check target
226 #:phases
227 (modify-phases %standard-phases
228 (replace 'configure
229 (lambda* (#:key inputs outputs #:allow-other-keys)
230 (substitute* "Makefile"
231 (("^(PNG(INC|LIB) = )/usr/local/" line vardef)
232 (string-append vardef (assoc-ref inputs "libpng") "/"))
233 (("^(Z(INC|LIB) = )/usr/local/" line vardef)
234 (string-append vardef (assoc-ref inputs "zlib") "/"))
235 ;; The Makefile is written by hand and not using $PREFIX
236 (("\\$\\(DESTDIR\\)/usr/")
237 (string-append (assoc-ref outputs "out") "/"))))))))
238 (inputs
239 `(("libpng" ,libpng)
240 ("zlib" , zlib)))
241 (home-page "https://pmt.sourceforge.io/pngcrush")
242 (synopsis "Utility to compress PNG files")
243 (description "pngcrusqh is an optimizer for PNG (Portable Network Graphics)
244 files. It can compress them as much as 40% losslessly.")
245 (license license:zlib)))
246
247 (define-public pngcrunch
248 ;; This package used to be wrongfully name "pngcrunch".
249 (deprecated-package "pngcrunch" pngcrush))
250
251 (define-public libjpeg
252 (package
253 (name "libjpeg")
254 (version "9b")
255 (source (origin
256 (method url-fetch)
257 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
258 version ".tar.gz"))
259 (sha256 (base32
260 "0lnhpahgdwlrkd41lx6cr90r199f8mc6ydlh7jznj5klvacd63r4"))))
261 (build-system gnu-build-system)
262 (synopsis "Library for handling JPEG files")
263 (description
264 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
265 JPEG is a standardized compression method for full-color and gray-scale
266 images.
267 The included programs provide conversion between the JPEG format and
268 image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.")
269 (license license:ijg)
270 (home-page "http://www.ijg.org/")))
271
272 (define-public libjpeg-8
273 (package (inherit libjpeg)
274 (version "8d")
275 (source (origin
276 (method url-fetch)
277 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
278 version ".tar.gz"))
279 (sha256 (base32
280 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
281
282 (define-public libjxr
283 (package
284 (name "libjxr")
285 (version "1.1")
286 (source (origin
287 ;; We are using the Debian source because CodePlex does not
288 ;; deliver an easily downloadable tarball.
289 (method url-fetch)
290 (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
291 version ".orig.tar.gz"))
292 (sha256
293 (base32
294 "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
295 (patch-flags '("-p1" "--binary"))
296 (patches (search-patches "libjxr-fix-function-signature.patch"
297 "libjxr-fix-typos.patch"))))
298 (build-system gnu-build-system)
299 (arguments '(#:make-flags '("CC=gcc")
300 #:tests? #f ; no check target
301 #:phases
302 (modify-phases %standard-phases
303 (delete 'configure) ; no configure script
304 ;; The upstream makefile does not include an install phase.
305 (replace 'install
306 (lambda* (#:key outputs #:allow-other-keys)
307 (let* ((out (assoc-ref outputs "out"))
308 (bin (string-append out "/bin"))
309 (lib (string-append out "/lib"))
310 (include (string-append out "/include/jxrlib")))
311 (for-each (lambda (file)
312 (install-file file include)
313 (delete-file file))
314 (append
315 '("jxrgluelib/JXRGlue.h"
316 "jxrgluelib/JXRMeta.h"
317 "jxrtestlib/JXRTest.h"
318 "image/sys/windowsmediaphoto.h")
319 (find-files "common/include" "\\.h$")))
320 (for-each (lambda (file)
321 (install-file file lib)
322 (delete-file file))
323 (find-files "." "\\.a$"))
324 (for-each (lambda (file)
325 (install-file file bin)
326 (delete-file file))
327 '("JxrDecApp" "JxrEncApp")))
328 #t)))))
329 (synopsis "Implementation of the JPEG XR standard")
330 (description "JPEG XR is an approved ISO/IEC International standard (its
331 official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
332 (license
333 (license:non-copyleft
334 "file://Makefile"
335 "See the header of the Makefile in the distribution."))
336 (home-page "https://jxrlib.codeplex.com/")))
337
338 (define-public jpegoptim
339 (package
340 (name "jpegoptim")
341 (version "1.4.5")
342 (source (origin
343 (method url-fetch)
344 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
345 version ".tar.gz"))
346 (sha256 (base32
347 "1mngi8c4mhzwa7i4wqrqq6i80cqj4adbacblfvk6dy573wywyxmi"))))
348 (build-system gnu-build-system)
349 (inputs `(("libjpeg" ,libjpeg)))
350 (arguments
351 ;; no tests
352 '(#:tests? #f))
353 (synopsis "Optimize JPEG images")
354 (description
355 "jpegoptim provides lossless optimization (based on optimizing
356 the Huffman tables) and \"lossy\" optimization based on setting
357 maximum quality factor.")
358 (license license:gpl2+)
359 (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim")))
360
361 (define-public libicns
362 (package
363 (name "libicns")
364 (version "0.8.1")
365 (source (origin
366 (method url-fetch)
367 (uri (string-append
368 "mirror://sourceforge/icns/"
369 "libicns-" version ".tar.gz"))
370 (sha256
371 (base32
372 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
373 (build-system gnu-build-system)
374 (inputs
375 `(("libpng" ,libpng)
376 ("jasper" ,jasper)))
377 (arguments
378 `(#:tests? #t)) ; No tests.
379 (home-page "http://icns.sourceforge.net/")
380 (synopsis "Library for handling Mac OS icns resource files")
381 (description
382 "Libicns is a library for the manipulation of Mac OS IconFamily resource
383 type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
384 convert between PNG and ICNS. @command{icns2png} will extract image files from
385 ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
386 with .desktop files. Additionally, @command{icontainer2png} is provided for
387 extracting icontainer icon files.")
388 (license (list license:lgpl2.1+ ; libicns
389 license:lgpl2.0+ ; src/apidocs.*
390 license:gpl2+)))) ; icns2png, png2icns, icontainer2png
391
392 (define-public libtiff
393 (package
394 (name "libtiff")
395 (version "4.0.9")
396 (source
397 (origin
398 (method url-fetch)
399 (uri (string-append "http://download.osgeo.org/libtiff/tiff-"
400 version ".tar.gz"))
401 (sha256
402 (base32
403 "1kfg4q01r4mqn7dj63ifhi6pmqzbf4xax6ni6kkk81ri5kndwyvf"))
404 (patches (search-patches "libtiff-CVE-2017-9935.patch"
405 "libtiff-CVE-2017-18013.patch"))))
406 (build-system gnu-build-system)
407 (outputs '("out"
408 "doc")) ;1.3 MiB of HTML documentation
409 (arguments
410 ;; Instead of using --docdir, this package has its own --with-docdir.
411 `(#:configure-flags (list (string-append "--with-docdir="
412 (assoc-ref %outputs "doc")
413 "/share/doc/"
414 ,name "-" ,version))))
415 (inputs `(("zlib" ,zlib)
416 ("libjpeg" ,libjpeg)))
417 (synopsis "Library for handling TIFF files")
418 (description
419 "Libtiff provides support for the Tag Image File Format (TIFF), a format
420 used for storing image data.
421 Included are a library, libtiff, for reading and writing TIFF and a small
422 collection of tools for doing simple manipulations of TIFF images.")
423 (license (license:non-copyleft "file://COPYRIGHT"
424 "See COPYRIGHT in the distribution."))
425 (home-page "http://www.simplesystems.org/libtiff/")))
426
427 (define-public leptonica
428 (package
429 (name "leptonica")
430 (version "1.74.4")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (string-append
435 "https://github.com/DanBloomberg/leptonica/archive/" version
436 ".tar.gz"))
437 (file-name (string-append "leptonica-" version ".tar.gz"))
438 (sha256
439 (base32 "10pw7pwccd0m0fc9rlrr2m41s7j1qvba2wcrav17pw1gclkf34i0"))))
440 (build-system gnu-build-system)
441 (native-inputs
442 `(("gnuplot" ,gnuplot) ;needed for test suite
443 ("autoconf" ,autoconf)
444 ("automake" ,automake)
445 ("libtool" ,libtool)
446 ("pkg-config" ,pkg-config)))
447 (inputs
448 `(("giflib" ,giflib)
449 ("libjpeg" ,libjpeg)
450 ("libpng" ,libpng)
451 ("libtiff" ,libtiff)
452 ("libwebp" ,libwebp)))
453 (propagated-inputs
454 ;; Linking a program with leptonica also requires these.
455 `(("openjpeg" ,openjpeg)
456 ("zlib" ,zlib)))
457 (arguments
458 '(#:phases
459 (modify-phases %standard-phases
460 (add-after 'unpack 'autogen
461 (lambda _
462 (zero? (system* "sh" "autobuild"))))
463 (add-after 'unpack 'patch-reg-wrapper
464 (lambda _
465 (substitute* "prog/reg_wrapper.sh"
466 ((" /bin/sh ")
467 (string-append " " (which "sh") " "))
468 (("which gnuplot")
469 "true")))))))
470 (home-page "http://www.leptonica.com/")
471 (synopsis "Library and tools for image processing and analysis")
472 (description
473 "Leptonica is a C library and set of command-line tools for efficient
474 image processing and image analysis operations. It supports rasterop, affine
475 transformations, binary and grayscale morphology, rank order, and convolution,
476 seedfill and connected components, image transformations combining changes in
477 scale and pixel depth, and pixelwise masking, blending, enhancement, and
478 arithmetic ops.")
479 (license license:bsd-2)))
480
481 (define-public jbig2dec
482 (package
483 (name "jbig2dec")
484 (version "0.14")
485 (source
486 (origin
487 (method url-fetch)
488 (uri (string-append "http://downloads.ghostscript.com/public/" name "/"
489 name "-" version ".tar.gz"))
490 (sha256
491 (base32 "0k01hp0q4275fj4rbr1gy64svfraw5w7wvwl08yjhvsnpb1rid11"))
492 (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
493 (build-system gnu-build-system)
494 (synopsis "Decoder of the JBIG2 image compression format")
495 (description
496 "JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit
497 monochrome) images at moderately high resolution, and in particular scanned
498 paper documents. In this domain it is very efficient, offering compression
499 ratios on the order of 100:1.
500
501 This is a decoder only implementation, and currently is in the alpha
502 stage, meaning it doesn't completely work yet. However, it is
503 maintaining parity with available encoders, so it is useful for real
504 work.")
505 (home-page "http://www.ghostscript.com/jbig2dec.html")
506 (license license:gpl2+)))
507
508 (define-public openjpeg
509 (package
510 (name "openjpeg")
511 (version "2.3.0")
512 (source
513 (origin
514 (method url-fetch)
515 (uri
516 (string-append "https://github.com/uclouvain/openjpeg/archive/v"
517 version ".tar.gz"))
518 (file-name (string-append name "-" version ".tar.gz"))
519 (sha256
520 (base32
521 "06npqzkg20avnygdwaqpap91r7qpdqgrn39adj2bl8v0pg0qgirx"))))
522 (build-system cmake-build-system)
523 (arguments
524 ;; Trying to run `$ make check' results in a no rule fault.
525 '(#:tests? #f))
526 (inputs
527 `(("lcms" ,lcms)
528 ("libpng" ,libpng)
529 ("libtiff" ,libtiff)
530 ("zlib" ,zlib)))
531 (synopsis "JPEG 2000 codec")
532 (description
533 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
534 been developed in order to promote the use of JPEG 2000, the new
535 still-image compression standard from the Joint Photographic Experts
536 Group (JPEG).
537
538 In addition to the basic codec, various other features are under
539 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
540 an indexing tool useful for the JPIP protocol, JPWL-tools for
541 error-resilience, a Java-viewer for j2k-images, ...")
542 (home-page "https://github.com/uclouvain/openjpeg")
543 (license license:bsd-2)))
544
545 (define-public openjpeg-1
546 (package (inherit openjpeg)
547 (name "openjpeg")
548 (version "1.5.2")
549 (source
550 (origin
551 (method url-fetch)
552 (uri
553 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
554 name "-" version ".tar.gz"))
555 (sha256
556 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
557
558 (define-public giflib
559 (package
560 (name "giflib")
561 (version "5.1.4")
562 (source (origin
563 (method url-fetch)
564 (uri (string-append "mirror://sourceforge/giflib/giflib-"
565 version ".tar.bz2"))
566 (sha256
567 (base32
568 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))
569 (patches (search-patches
570 "giflib-make-reallocarray-private.patch"))))
571 (build-system gnu-build-system)
572 (outputs '("bin" ; utility programs
573 "out")) ; library
574 (inputs `(("libx11" ,libx11)
575 ("libice" ,libice)
576 ("libsm" ,libsm)
577 ("perl" ,perl)))
578 (arguments
579 `(#:phases
580 (modify-phases %standard-phases
581 (add-after 'unpack 'disable-html-doc-gen
582 (lambda _
583 (substitute* "doc/Makefile.in"
584 (("^all: allhtml manpages") ""))
585 #t))
586 (add-after 'install 'install-manpages
587 (lambda* (#:key outputs #:allow-other-keys)
588 (let* ((bin (assoc-ref outputs "bin"))
589 (man1dir (string-append bin "/share/man/man1")))
590 (mkdir-p man1dir)
591 (for-each (lambda (file)
592 (let ((base (basename file)))
593 (format #t "installing `~a' to `~a'~%"
594 base man1dir)
595 (copy-file file
596 (string-append
597 man1dir "/" base))))
598 (find-files "doc" "\\.1"))
599 #t))))))
600 (synopsis "Tools and library for working with GIF images")
601 (description
602 "GIFLIB is a library for reading and writing GIF images. It is API and
603 ABI compatible with libungif which was in wide use while the LZW compression
604 algorithm was patented. Tools are also included to convert, manipulate,
605 compose, and analyze GIF images.")
606 (home-page "http://giflib.sourceforge.net/")
607 (license license:x11)))
608
609 (define-public libungif
610 (package
611 (name "libungif")
612 (version "4.1.4")
613 (source (origin
614 (method url-fetch)
615 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
616 "libungif-" version "/libungif-"
617 version ".tar.bz2"))
618 (sha256
619 (base32
620 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
621 (build-system gnu-build-system)
622 (inputs `(("perl" ,perl))) ;package ships some perl tools
623 (home-page "http://giflib.sourceforge.net/")
624 (synopsis "GIF decompression library")
625 (description
626 "libungif is the old GIF decompression library by the GIFLIB project.")
627 (license license:expat)))
628
629 (define-public imlib2
630 (package
631 (name "imlib2")
632 (version "1.5.1")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append
636 "mirror://sourceforge/enlightenment/imlib2-src/" version
637 "/imlib2-" version ".tar.bz2"))
638 (sha256
639 (base32
640 "1bms2iwmvnvpz5jqq3r52glarqkafif47zbh1ykz8hw85d2mfkps"))))
641 (build-system gnu-build-system)
642 (native-inputs
643 `(("pkgconfig" ,pkg-config)))
644 (inputs
645 `(("libx11" ,libx11)
646 ("libxext" ,libxext)
647 ("freetype" ,freetype)
648 ("libjpeg" ,libjpeg)
649 ("libpng" ,libpng)
650 ("libtiff" ,libtiff)
651 ("giflib" ,giflib)
652 ("bzip2" ,bzip2)))
653 (home-page "https://sourceforge.net/projects/enlightenment/")
654 (synopsis
655 "Loading, saving, rendering and manipulating image files")
656 (description
657 "Imlib2 is a library that does image file loading and saving as well as
658 rendering, manipulation, arbitrary polygon support, etc.
659
660 It does ALL of these operations FAST. Imlib2 also tries to be highly
661 intelligent about doing them, so writing naive programs can be done easily,
662 without sacrificing speed.
663
664 This is a complete rewrite over the Imlib 1.x series. The architecture is
665 more modular, simple, and flexible.")
666 (license license:imlib2)))
667
668 (define-public giblib
669 (package
670 (name "giblib")
671 (version "1.2.4")
672 (source (origin
673 (method url-fetch)
674 (uri (list
675 (string-append
676 "http://linuxbrit.co.uk/downloads/giblib-"
677 version ".tar.gz")
678 (string-append
679 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
680 "files/giblib/giblib-" version ".tar.gz")))
681 (sha256
682 (base32
683 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
684 (build-system gnu-build-system)
685 (inputs
686 `(("libx11" ,libx11)
687 ("imlib2" ,imlib2)))
688 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
689 (synopsis "Wrapper library for imlib2")
690 (description
691 "Giblib is a simple library which wraps imlib2's context API, avoiding
692 all the context_get/set calls, adds fontstyles to the truetype renderer and
693 supplies a generic doubly-linked list and some string functions.")
694 ;; This license removes a clause about X Consortium from the original
695 ;; X11 license.
696 (license (license:x11-style "file://COPYING"
697 "See 'COPYING' in the distribution."))))
698
699 (define-public freeimage
700 (package
701 (name "freeimage")
702 (version "3.17.0")
703 (source (origin
704 (method url-fetch)
705 (uri (string-append
706 "mirror://sourceforge/freeimage/Source%20Distribution/"
707 version "/FreeImage"
708 (string-concatenate (string-split version #\.))
709 ".zip"))
710 (sha256
711 (base32
712 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"))
713 (modules '((guix build utils)))
714 (snippet
715 '(begin
716 (for-each
717 (lambda (dir)
718 (delete-file-recursively (string-append "Source/" dir)))
719 '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
720 ;; "LibJXR"
721 "LibWebP" "OpenEXR" "ZLib"))))
722 (patches (search-patches "freeimage-unbundle.patch"
723 "freeimage-CVE-2015-0852.patch"
724 "freeimage-CVE-2016-5684.patch"
725 "freeimage-fix-build-with-gcc-5.patch"))))
726 (build-system gnu-build-system)
727 (arguments
728 '(#:phases
729 (modify-phases %standard-phases
730 ;; According to Fedora these files depend on private headers, but their
731 ;; presence is required for building, so we replace them with empty files.
732 (add-after 'unpack 'delete-unbuildable-files
733 (lambda _
734 (for-each (lambda (file)
735 (delete-file file)
736 (close (open file O_CREAT)))
737 '("Source/FreeImage/PluginG3.cpp"
738 "Source/FreeImageToolkit/JPEGTransform.cpp"))
739 #t))
740 ;; These scripts generate the Makefiles.
741 (replace 'configure
742 (lambda _
743 (invoke "sh" "gensrclist.sh")
744 (invoke "sh" "genfipsrclist.sh")))
745 (add-before 'build 'patch-makefile
746 (lambda* (#:key outputs #:allow-other-keys)
747 (substitute* "Makefile.gnu"
748 (("/usr") (assoc-ref outputs "out"))
749 (("-o root -g root") ""))
750 #t)))
751 #:make-flags
752 (list "CC=gcc"
753 ;; We need '-fpermissive' for Source/FreeImage.h.
754 ;; libjxr doesn't have a pkg-config file.
755 (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive "
756 ;"-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib"
757 ))
758 #:tests? #f)) ; no check target
759 (native-inputs
760 `(("pkg-config" ,pkg-config)
761 ("unzip" ,unzip)))
762 (inputs
763 `(("libjpeg" ,libjpeg)
764 ;("libjxr" ,libjxr)
765 ("libpng" ,libpng)
766 ("libraw" ,libraw)
767 ("libtiff" ,libtiff)
768 ("libwebp" ,libwebp)
769 ("openexr" ,openexr)
770 ("openjpeg" ,openjpeg)
771 ("zlib" ,zlib)))
772 (synopsis "Library for handling popular graphics image formats")
773 (description
774 "FreeImage is a library for developers who would like to support popular
775 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
776 (license license:gpl2+)
777 (home-page "http://freeimage.sourceforge.net")))
778
779 (define-public vigra
780 (package
781 (name "vigra")
782 (version "1.11.1")
783 (source
784 (origin
785 (method url-fetch)
786 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
787 "Version-" (string-join (string-split version #\.) "-")
788 "/vigra-" version "-src.tar.gz"))
789 (sha256 (base32
790 "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5"))))
791 (build-system cmake-build-system)
792 (inputs
793 `(("boost" ,boost)
794 ("fftw" ,fftw)
795 ("fftwf" ,fftwf)
796 ("hdf5" ,hdf5)
797 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
798 ; to create a configure-flag
799 ("libjpeg" ,libjpeg)
800 ("libpng" ,libpng)
801 ("libtiff" ,libtiff)
802 ("openexr" ,openexr)
803 ("python" ,python-2) ; print syntax
804 ("python2-numpy" ,python2-numpy)
805 ("zlib" ,zlib)))
806 (native-inputs
807 `(("doxygen" ,doxygen)
808 ("python2-nose" ,python2-nose)
809 ("python2-sphinx" ,python2-sphinx)))
810 (arguments
811 `(#:test-target "check"
812 #:parallel-build? #f ; parallel builds trigger an ICE
813 #:configure-flags
814 (list "-Wno-dev" ; suppress developer mode with lots of warnings
815 (string-append "-DVIGRANUMPY_INSTALL_DIR="
816 (assoc-ref %outputs "out")
817 "/lib/python2.7/site-packages")
818 ;; OpenEXR is not enabled by default.
819 "-DWITH_OPENEXR=1"
820 ;; Fix rounding error on 32-bit machines
821 "-DCMAKE_C_FLAGS=-ffloat-store"
822 ;; The header files of ilmbase are not found when included
823 ;; by the header files of openexr, and an explicit flag
824 ;; needs to be set.
825 (string-append "-DCMAKE_CXX_FLAGS=-I"
826 (assoc-ref %build-inputs "ilmbase")
827 "/include/OpenEXR"
828 " -ffloat-store"))))
829 (synopsis "Computer vision library")
830 (description
831 "VIGRA stands for Vision with Generic Algorithms. It is an image
832 processing and analysis library that puts its main emphasis on customizable
833 algorithms and data structures. It is particularly strong for
834 multi-dimensional image processing.")
835 (license license:expat)
836 (home-page "https://ukoethe.github.io/vigra/")))
837
838 (define-public libwebp
839 (package
840 (name "libwebp")
841 (version "1.0.0")
842 (source
843 (origin
844 ;; No tarballs are provided for >0.6.1.
845 (method git-fetch)
846 (uri (git-reference
847 (url "https://chromium.googlesource.com/webm/libwebp")
848 (commit (string-append "v" version))))
849 (file-name (git-file-name name version))
850 (sha256
851 (base32
852 "1w8jzdbr1s4238ygyrlxryycss3f2z6d9amxdq8m82nl3l6skar4"))))
853 (build-system gnu-build-system)
854 (inputs
855 `(("freeglut" ,freeglut)
856 ("giflib" ,giflib)
857 ("libjpeg" ,libjpeg)
858 ("libpng" ,libpng)
859 ("libtiff" ,libtiff)))
860 (native-inputs
861 `(("autoconf" ,autoconf)
862 ("automake" ,automake)
863 ("libtool" ,libtool)))
864 (arguments
865 '(#:configure-flags '("--enable-libwebpmux"
866 "--enable-libwebpdemux"
867 "--enable-libwebpdecoder")
868 #:phases (modify-phases %standard-phases
869 (add-after 'unpack 'bootstrap
870 (lambda _
871 (invoke "autoreconf" "-vif"))))))
872 (home-page "https://developers.google.com/speed/webp/")
873 (synopsis "Lossless and lossy image compression")
874 (description
875 "WebP is a new image format that provides lossless and lossy compression
876 for images. WebP lossless images are 26% smaller in size compared to
877 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
878 equivalent SSIM index. WebP supports lossless transparency (also known as
879 alpha channel) with just 22% additional bytes. Transparency is also supported
880 with lossy compression and typically provides 3x smaller file sizes compared
881 to PNG when lossy compression is acceptable for the red/green/blue color
882 channels.")
883 (license license:bsd-3)))
884
885 (define-public libmng
886 (package
887 (name "libmng")
888 (version "2.0.3")
889 (source (origin
890 (method url-fetch)
891 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
892 version "/" name "-" version ".tar.xz"))
893 (sha256
894 (base32
895 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
896 (build-system gnu-build-system)
897 (propagated-inputs
898 ;; These are all in the 'Libs.private' field of libmng.pc.
899 `(("lcms" ,lcms)
900 ("libjpeg" ,libjpeg)
901 ("zlib" ,zlib)))
902 (home-page "http://www.libmng.com/")
903 (synopsis "Library for handling MNG files")
904 (description
905 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
906 (license license:bsd-3)))
907
908 (define-public exiv2
909 (package
910 (name "exiv2")
911 (version "0.26")
912 (source (origin
913 (method url-fetch)
914 (uri (list (string-append "http://www.exiv2.org/builds/exiv2-"
915 version "-trunk.tar.gz")
916 (string-append "http://www.exiv2.org/exiv2-"
917 version ".tar.gz")
918 (string-append "https://fossies.org/linux/misc/exiv2-"
919 version ".tar.gz")))
920 (patches (search-patches "exiv2-CVE-2017-14860.patch"
921 "exiv2-CVE-2017-14859-14862-14864.patch"))
922 (sha256
923 (base32
924 "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7"))))
925 (build-system gnu-build-system)
926 (arguments '(#:tests? #f)) ; no `check' target
927 (propagated-inputs
928 `(("expat" ,expat)
929 ("zlib" ,zlib)))
930 (native-inputs
931 `(("intltool" ,intltool)))
932 (home-page "http://www.exiv2.org/")
933 (synopsis "Library and command-line utility to manage image metadata")
934 (description
935 "Exiv2 is a C++ library and a command line utility to manage image
936 metadata. It provides fast and easy read and write access to the Exif, IPTC
937 and XMP metadata of images in various formats.")
938
939 ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
940 ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
941 ;; The core is GPLv2+:
942 ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
943 (license license:gpl2+)))
944
945 (define-public devil
946 (package
947 (name "devil")
948 (version "1.8.0")
949 (source (origin
950 (method url-fetch)
951 (uri (string-append "http://downloads.sourceforge.net/openil/"
952 "DevIL-" version ".tar.gz"))
953 (sha256
954 (base32
955 "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80"))))
956 (build-system cmake-build-system)
957 (arguments
958 '(;; XXX: Not supported in the released CMakeLists.txt.
959 ;; Enable this for > 1.8.0.
960 #:tests? #f
961 #:phases
962 (modify-phases %standard-phases
963 (add-before 'configure 'change-directory
964 (lambda _ (chdir "DevIL") #t)))))
965 (native-inputs
966 `(("pkg-config" ,pkg-config)))
967 (inputs
968 `(("lcms" ,lcms)
969 ("libjpeg" ,libjpeg-turbo)
970 ("libmng" ,libmng)
971 ("libpng" ,libpng)
972 ("libtiff" ,libtiff)
973 ("openexr" ,openexr)
974 ("zlib" ,zlib)))
975 (synopsis "Library for manipulating many image formats")
976 (description "Developer's Image Library (DevIL) is a library to develop
977 applications with support for many types of images. DevIL can load, save,
978 convert, manipulate, filter and display a wide variety of image formats.")
979 (home-page "http://openil.sourceforge.net")
980 (license license:lgpl2.1+)))
981
982 (define-public jasper
983 (package
984 (name "jasper")
985 (version "2.0.14")
986 (source (origin
987 (method url-fetch)
988 (uri (string-append "https://github.com/mdadams/jasper/archive/"
989 "version-" version ".tar.gz"))
990 (file-name (string-append name "-" version ".tar.gz"))
991 (sha256
992 (base32
993 "0yx9y5y0g6jv142vnqp50j3k8k5yqznz3smrblv192wgfbm6w9l5"))))
994 (build-system cmake-build-system)
995 (inputs `(("libjpeg" ,libjpeg)))
996 (synopsis "JPEG-2000 library")
997 (description "The JasPer Project is an initiative to provide a reference
998 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
999 ISO/IEC 15444-1).")
1000 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
1001 (license (license:x11-style "file://LICENSE"))))
1002
1003 (define-public zimg
1004 (package
1005 (name "zimg")
1006 (version "2.5")
1007 (source
1008 (origin
1009 (method url-fetch)
1010 (uri (string-append "https://github.com/sekrit-twc/zimg/archive/"
1011 "release-" version ".tar.gz"))
1012 (file-name (string-append name "-" version ".tar.gz"))
1013 (sha256
1014 (base32
1015 "0kbq2dy659645fmgxpzg38b6y6x82kwkydhc380kdkaikv2brcjh"))))
1016 (build-system gnu-build-system)
1017 (native-inputs
1018 `(("autoconf" ,autoconf)
1019 ("automake" ,automake)
1020 ("libtool" ,libtool)))
1021 (arguments
1022 '(#:phases
1023 (modify-phases %standard-phases
1024 (add-after 'unpack 'autogen
1025 (lambda _
1026 (zero? (system* "sh" "autogen.sh")))))))
1027 (synopsis "Scaling, colorspace conversion, and dithering library")
1028 (description "Zimg implements the commonly required image processing basics
1029 of scaling, colorspace conversion, and depth conversion. A simple API enables
1030 conversion between any supported formats to operate with minimal knowledge from
1031 the programmer.")
1032 (home-page "https://github.com/sekrit-twc/zimg")
1033 ;; test/extra/ contains musl-libm,
1034 ;; which is MIT/expat licensed, but only used for tests
1035 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
1036
1037 (define-public perceptualdiff
1038 (package
1039 (name "perceptualdiff")
1040 (version "1.3")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
1045 version ".tar.gz"))
1046 (file-name (string-append name "-" version ".tar.gz"))
1047 (sha256
1048 (base32
1049 "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
1050 (build-system cmake-build-system)
1051 (inputs `(("freeimage" ,freeimage)))
1052 (arguments
1053 '(#:phases (modify-phases %standard-phases
1054 (add-after 'unpack 'fix-tests
1055 ;; cmake-build-system uses a build/ directory outside
1056 ;; of the source tree, one level higher than expected
1057 (lambda _
1058 (substitute* "test/run_tests.bash"
1059 (("../build") "../../build")))))))
1060 (home-page "https://github.com/myint/perceptualdiff")
1061 (synopsis "Perceptual image comparison utility")
1062 (description "PerceptualDiff visually compares two images to determine
1063 whether they look alike. It uses a computational model of the human visual
1064 system to detect similarities. This allows it too see beyond irrelevant
1065 differences in file encoding, image quality, and other small variations.")
1066 (license license:gpl2+)))
1067
1068 (define-public steghide
1069 (package
1070 (name "steghide")
1071 (version "0.5.1")
1072 (source (origin
1073 (method url-fetch)
1074 (uri (string-append "mirror://sourceforge/steghide/steghide/"
1075 version "/steghide-" version ".tar.bz2"))
1076 (sha256
1077 (base32
1078 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
1079 (patches (list (search-patch "steghide-fixes.patch")))))
1080 (build-system gnu-build-system)
1081 (native-inputs
1082 `(("gettext" ,gettext-minimal)
1083 ("libtool" ,libtool)
1084 ("perl" ,perl))) ;for tests
1085 (inputs
1086 `(("libmhash" ,libmhash)
1087 ("libmcrypt" ,libmcrypt)
1088 ("libjpeg" ,libjpeg)
1089 ("zlib" ,zlib)))
1090 (arguments
1091 `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc
1092
1093 #:phases (modify-phases %standard-phases
1094 (add-before 'configure 'set-perl-search-path
1095 (lambda _
1096 ;; Work around "dotless @INC" build failure.
1097 (setenv "PERL5LIB"
1098 (string-append (getcwd) "/tests:"
1099 (getenv "PERL5LIB")))
1100 #t)))))
1101 (home-page "http://steghide.sourceforge.net")
1102 (synopsis "Image and audio steganography")
1103 (description
1104 "Steghide is a program to hide data in various kinds of image and audio
1105 files (known as @dfn{steganography}). Neither color nor sample frequencies are
1106 changed, making the embedding resistant against first-order statistical tests.")
1107 (license license:gpl2+)))
1108
1109 (define-public stb-image-for-extempore
1110 (let ((revision "1")
1111 (commit "152a250a702bf28951bb0220d63bc0c99830c498"))
1112 (package
1113 (name "stb-image-for-extempore")
1114 (version (string-append "0-" revision "." (string-take commit 9)))
1115 (source
1116 (origin (method git-fetch)
1117 (uri (git-reference
1118 (url "https://github.com/extemporelang/stb.git")
1119 (commit commit)))
1120 (sha256
1121 (base32
1122 "0y0aa20pj9311x2ii06zg8xs34idg14hfgldqc5ymizc6cf1qiqv"))
1123 (file-name (string-append name "-" version "-checkout"))))
1124 (build-system cmake-build-system)
1125 (arguments `(#:tests? #f)) ; no tests included
1126 ;; Extempore refuses to build on architectures other than x86_64
1127 (supported-systems '("x86_64-linux"))
1128 (home-page "https://github.com/extemporelang/stb")
1129 (synopsis "Image library for Extempore")
1130 (description
1131 "This package is a collection of assorted single-file libraries. Of
1132 all included libraries only the image loading and decoding library is
1133 installed as @code{stb_image}.")
1134 (license license:public-domain))))
1135
1136 (define-public optipng
1137 (package
1138 (name "optipng")
1139 (version "0.7.7")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
1144 version ".tar.gz"))
1145 (sha256
1146 (base32
1147 "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg"))))
1148 (build-system gnu-build-system)
1149 (inputs
1150 `(("zlib" ,zlib)))
1151 (arguments
1152 '(#:phases
1153 (modify-phases %standard-phases
1154 (replace 'configure
1155 (lambda* (#:key outputs #:allow-other-keys)
1156 ;; configure script doesn't accept arguments CONFIG_SHELL and SHELL
1157 (invoke "sh" "configure"
1158 (string-append "--prefix=" (assoc-ref outputs "out")))
1159 #t)))))
1160 (synopsis "Optimizer that recompresses PNG image files to a smaller size")
1161 (description "OptiPNG is a PNG optimizer that recompresses image
1162 files to a smaller size, without losing any information. This program
1163 also converts external formats (BMP, GIF, PNM and TIFF) to optimized
1164 PNG, and performs PNG integrity checks and corrections.")
1165 (home-page "http://optipng.sourceforge.net/")
1166 (license license:zlib)))
1167
1168 (define-public libjpeg-turbo
1169 (package
1170 (name "libjpeg-turbo")
1171 (version "1.5.3")
1172 (source (origin
1173 (method url-fetch)
1174 (uri (string-append "mirror://sourceforge/" name "/" version "/"
1175 name "-" version ".tar.gz"))
1176 (sha256
1177 (base32
1178 "08r5b5mywwrxv4axvq80dm31cklz81grczlzlxr2xqa6pgi90j5j"))))
1179 (build-system gnu-build-system)
1180 (native-inputs
1181 `(("nasm" ,nasm)))
1182 (arguments
1183 '(#:test-target "test"
1184 #:configure-flags (list "--with-build-date=1970-01-01")))
1185 (home-page "http://www.libjpeg-turbo.org/")
1186 (synopsis "SIMD-accelerated JPEG image handling library")
1187 (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
1188 JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
1189 x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems,
1190 its highly-optimized Huffman coding routines allow it to outperform libjpeg by
1191 a significant amount.
1192 libjpeg-turbo implements both the traditional libjpeg API and the less powerful
1193 but more straightforward TurboJPEG API, and provides a full-featured Java
1194 interface. It supports color space extensions that allow it to compress from
1195 and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
1196 (license (list license:bsd-3 ; jsimd*.[ch] and most of simd/
1197 license:ijg)))) ; the rest
1198
1199 (define-public niftilib
1200 (package
1201 (name "niftilib")
1202 (version "2.0.0")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (list (string-append "mirror://sourceforge/niftilib/"
1206 "nifticlib/nifticlib_"
1207 (string-join (string-split version #\.) "_")
1208 "/nifticlib-" version ".tar.gz")))
1209 (sha256
1210 (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
1211 (build-system gnu-build-system)
1212 (arguments
1213 '(#:tests? #f ; there is no test target
1214 #:parallel-build? #f ; not supported
1215 #:make-flags
1216 (list "SHELL=bash"
1217 (string-append "ZLIB_INC="
1218 (assoc-ref %build-inputs "zlib") "/include")
1219 ;; Append "-fPIC" to CFLAGS.
1220 (string-append "CFLAGS="
1221 "-Wall -ansi -pedantic -fPIC"))
1222 #:phases
1223 (modify-phases %standard-phases
1224 (replace 'install
1225 (lambda* (#:key outputs #:allow-other-keys)
1226 (let ((out (assoc-ref outputs "out")))
1227 (for-each
1228 (lambda (dir)
1229 (copy-recursively dir (string-append out "/" dir)))
1230 '("bin" "lib" "include")))
1231 #t))
1232 (delete 'configure))))
1233 (inputs
1234 `(("zlib" ,zlib)))
1235 (synopsis "Library for reading and writing files in the nifti-1 format")
1236 (description "Niftilib is a set of i/o libraries for reading and writing
1237 files in the nifti-1 data format - a binary file format for storing
1238 medical image data, e.g. magnetic resonance image (MRI) and functional MRI
1239 (fMRI) brain images.")
1240 (home-page "http://niftilib.sourceforge.net")
1241 (license license:public-domain)))
1242
1243 (define-public gpick
1244 (package
1245 (name "gpick")
1246 (version "0.2.5")
1247 (source (origin
1248 (method url-fetch)
1249 (uri (string-append "https://github.com/thezbyg/gpick/archive/"
1250 name "-" version ".tar.gz"))
1251 (sha256
1252 (base32
1253 "0mxvxk15xhk2i5vfavjhnkk4j3bnii0gpf8di14rlbpq070hd5rs"))))
1254 (build-system scons-build-system)
1255 (native-inputs
1256 `(("boost" ,boost)
1257 ("gettext" ,gnu-gettext)
1258 ("pkg-config" ,pkg-config)))
1259 (inputs
1260 `(("expat" ,expat)
1261 ("gtk2" ,gtk+-2)
1262 ("lua" ,lua-5.2)))
1263 (arguments
1264 `(#:tests? #f
1265 #:scons ,scons-python2
1266 #:scons-flags (list (string-append "DESTDIR=" %output))
1267 #:phases
1268 (modify-phases %standard-phases
1269 (add-before 'build 'fix-lua-reference
1270 (lambda _
1271 (substitute* "SConscript"
1272 (("lua5.2") "lua-5.2"))
1273 #t)))))
1274 (home-page "http://www.gpick.org/")
1275 (synopsis "Color picker")
1276 (description "Gpick is an advanced color picker and palette editing tool.")
1277 (license license:bsd-3)))
1278
1279 (define-public libiptcdata
1280 (package
1281 (name "libiptcdata")
1282 (version "1.0.4")
1283 (source (origin
1284 (method url-fetch)
1285 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1286 version "/" name "-" version ".tar.gz"))
1287 (sha256
1288 (base32
1289 "03pfvkmmx762iydq0q207x2028d275pbdysfsgpmrr0ywy63pxkr"))))
1290 (build-system gnu-build-system)
1291 (home-page "http://libiptcdata.sourceforge.net/")
1292 (synopsis "IPTC metadata manipulation library")
1293 (description "Libiptcdata is a C library for manipulating the International
1294 Press Telecommunications Council (IPTC) metadata stored within multimedia files
1295 such as images. This metadata can include captions and keywords, often used by
1296 popular photo management applications. The library provides routines for
1297 parsing, viewing, modifying, and saving this metadata.")
1298 (license license:lgpl2.0+)))
1299
1300 (define-public flameshot
1301 (package
1302 (name "flameshot")
1303 (version "0.5.1")
1304 (source
1305 (origin
1306 (method url-fetch)
1307 (uri (string-append "https://github.com/lupoDharkael/flameshot/archive/"
1308 "v" version ".tar.gz"))
1309 (file-name (string-append name "-" version ".tar.gz"))
1310 (sha256
1311 (base32
1312 "0kp451bqgssvg8n3sg60s3fifplm9l5kxiij0yxkl864p2mhw8im"))))
1313 (build-system gnu-build-system)
1314 (native-inputs
1315 `(("qttools" ,qttools)))
1316 (inputs
1317 `(("qtbase" ,qtbase)))
1318 (arguments
1319 `(#:tests? #f ; no tests
1320 #:phases
1321 (modify-phases %standard-phases
1322 (replace 'configure
1323 (lambda* (#:key outputs #:allow-other-keys)
1324 (invoke "qmake"
1325 "CONFIG+=packaging"
1326 (string-append "BASEDIR=" (assoc-ref outputs "out"))
1327 "PREFIX=/"))))))
1328 (home-page "https://github.com/lupoDharkael/flameshot")
1329 (synopsis "Powerful yet simple to use screenshot software")
1330 (description "Flameshot is a screenshot program.
1331 Features:
1332
1333 @itemize
1334 @item Customizable appearance.
1335 @item Easy to use.
1336 @item In-app screenshot edition.
1337 @item DBus interface.
1338 @item Upload to Imgur.
1339 @end itemize\n")
1340 (license license:gpl3+)))
1341
1342 (define-public r-jpeg
1343 (package
1344 (name "r-jpeg")
1345 (version "0.1-8")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (cran-uri "jpeg" version))
1350 (sha256
1351 (base32
1352 "05hawv5qcb82ljc1l2nchx1wah8mq2k2kfkhpzyww554ngzbwcnh"))))
1353 (build-system r-build-system)
1354 (inputs `(("libjpeg" ,libjpeg)))
1355 (home-page "http://www.rforge.net/jpeg/")
1356 (synopsis "Read and write JPEG images with R")
1357 (description "This package provides a way to read, write and display bitmap
1358 images stored in the JPEG format with R. It can read and write both files and
1359 in-memory raw vectors.")
1360 (license license:gpl2+)))