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