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