+
+(define-public devil
+ (package
+ (name "devil")
+ (version "1.7.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://downloads.sourceforge.net/openil/"
+ "DevIL-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8"))
+ ;; Backported from upstream:
+ ;; https://github.com/DentonW/DevIL/commit/724194d7a9a91221a564579f64bdd6f0abd64219.patch
+ (patches (search-patches "devil-fix-libpng.patch"
+ "devil-CVE-2009-3994.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Fix old lcms include directives and lib flags.
+ '(substitute* '("configure" "src-IL/src/il_profiles.c")
+ (("-llcms") "-llcms2")
+ (("lcms/lcms\\.h") "lcms2/lcms2.h")
+ (("lcms\\.h") "lcms2.h")))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags '("--enable-ILUT=yes") ; build utility library
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Fix hard-coded /bin/bash reference.
+ (substitute* '("test/Makefile")
+ (("TESTS_ENVIRONMENT = /bin/bash")
+ (string-append "TESTS_ENVIRONMENT = "
+ (assoc-ref inputs "bash")
+ "/bin/bash")))
+ #t)))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("lcms" ,lcms)
+ ("libjpeg" ,libjpeg)
+ ("libmng" ,libmng)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)
+ ("openexr" ,openexr)
+ ("zlib" ,zlib)))
+ (synopsis "Library for manipulating many image formats")
+ (description "Developer's Image Library (DevIL) is a library to develop
+applications with support for many types of images. DevIL can load, save,
+convert, manipulate, filter and display a wide variety of image formats.")
+ (home-page "http://openil.sourceforge.net")
+ (license license:lgpl2.1+)))
+
+(define-public jasper
+ (package
+ (name "jasper")
+ (version "1.900.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.ece.uvic.ca/~frodo/jasper"
+ "/software/jasper-" version ".zip"))
+ (sha256
+ (base32
+ "154l7zk7yh3v8l2l6zm5s2alvd2fzkp6c9i18iajfbna5af5m43b"))
+ (patches (search-patches
+ "jasper-CVE-2007-2721.patch"
+ "jasper-CVE-2008-3520.patch"
+ "jasper-CVE-2008-3522.patch"
+ "jasper-CVE-2011-4516-and-CVE-2011-4517.patch"
+ "jasper-CVE-2014-8137.patch"
+ "jasper-CVE-2014-8138.patch"
+ "jasper-CVE-2014-8157.patch"
+ "jasper-CVE-2014-8158.patch"
+ "jasper-CVE-2014-9029.patch"
+ "jasper-CVE-2016-1577.patch"
+ "jasper-CVE-2016-1867.patch"
+ "jasper-CVE-2016-2089.patch"
+ "jasper-CVE-2016-2116.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (synopsis "JPEG-2000 library")
+ (description "The JasPer Project is an initiative to provide a reference
+implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
+ISO/IEC 15444-1).")
+ (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
+ (license (license:x11-style "file://LICENSE"))))
+
+(define-public zimg
+ (package
+ (name "zimg")
+ (version "2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/sekrit-twc/zimg/archive/"
+ "release-" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hqp1gcsa2zhypms5dnasb1srjgxdqm7cip3w5i571kk9nxkn289"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'autogen
+ (lambda _
+ (zero? (system* "sh" "autogen.sh")))))))
+ (synopsis "Scaling, colorspace conversion, and dithering library")
+ (description "Zimg implements the commonly required image processing basics
+of scaling, colorspace conversion, and depth conversion. A simple API enables
+conversion between any supported formats to operate with minimal knowledge from
+the programmer.")
+ (home-page "https://github.com/sekrit-twc/zimg")
+ ;; test/extra/ contains musl-libm,
+ ;; which is MIT/expat licensed, but only used for tests
+ (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
+
+(define-public perceptualdiff
+ (package
+ (name "perceptualdiff")
+ (version "1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
+ (build-system cmake-build-system)
+ (inputs `(("freeimage" ,freeimage)))
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ ;; cmake-build-system uses a build/ directory outside
+ ;; of the source tree, one level higher than expected
+ (lambda _
+ (substitute* "test/run_tests.bash"
+ (("../build") "../../build")))))))
+ (home-page "https://github.com/myint/perceptualdiff")
+ (synopsis "Perceptual image comparison utility")
+ (description "PerceptualDiff visually compares two images to determine
+whether they look alike. It uses a computational model of the human visual
+system to detect similarities. This allows it too see beyond irrelevant
+differences in file encoding, image quality, and other small variations.")
+ (license license:gpl2+)))
+
+(define-public steghide
+ (package
+ (name "steghide")
+ (version "0.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/steghide/steghide/"
+ version "/steghide-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
+ (patches (list (search-patch "steghide-fixes.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("gettext" ,gnu-gettext)
+ ("libtool" ,libtool)
+ ("perl" ,perl))) ;for tests
+ (inputs
+ `(("libmhash" ,libmhash)
+ ("libmcrypt" ,libmcrypt)
+ ("libjpeg" ,libjpeg)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:make-flags '("CXXFLAGS=-fpermissive"))) ;required for MHashPP.cc
+ (home-page "http://steghide.sourceforge.net")
+ (synopsis "Image and audio steganography")
+ (description
+ "Steghide is a steganography program that is able to hide data in various
+kinds of image- and audio-files. The color- respectivly sample-frequencies
+are not changed thus making the embedding resistant against first-order
+statistical tests.")
+ (license license:gpl2+)))