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