+
+(define-public lodepng
+ ;; There are no tags in the repository, so we take the version as defined in
+ ;; lodepng.cpp.
+ (let ((commit "48e5364ef48ec2408f44c727657ac1b6703185f8")
+ (revision "1")
+ (version "20200215"))
+ (package
+ (name "lodepng")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lvandeve/lodepng")
+ (commit commit)))
+ (sha256
+ (base32
+ "1a1x8ag2scanzb2066jm9hg2y9kaa3wmpgmz10l1x9bkpik612lw"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (setenv "CXXFLAGS" "-fPIC")
+ (invoke "make" "lodepng.o")
+ (invoke "make" "lodepng_util.o")
+ (invoke "g++" "-fPIC" "-O3"
+ "-o" "liblodepng.so"
+ "-shared" "lodepng.o" "lodepng_util.o")
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "make" "unittest")
+ (invoke "./unittest")
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (string-append out "/share/doc"))
+ (lib (string-append out "/lib"))
+ (include (string-append out "/include")))
+ (install-file "lodepng.h" include)
+ (install-file "lodepng_util.h" include)
+ (install-file "liblodepng.so" lib)
+ (install-file "README.md" doc)
+ #t))))))
+ (home-page "https://lodev.org/lodepng/")
+ (synopsis "PNG encoder and decoder in C and C++, without dependencies")
+ (description "LodePNG is a PNG image decoder and encoder, all in one,
+no dependency or linkage required. It's made for C (ISO C90), and has a C++
+wrapper with a more convenient interface on top.")
+ (license license:zlib))))
+
+(define-public icoutils
+ (package
+ (name "icoutils")
+ (version "0.32.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://savannah/icoutils/icoutils-" version ".tar.bz2"))
+ (sha256
+ (base32 "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libpng" ,libpng)
+ ("perl" ,perl)))
+ (propagated-inputs
+ `(("perl-libwww" ,perl-libwww)))
+ (home-page "https://www.nongnu.org/icoutils/")
+ (synopsis "Extract and convert bitmaps from Windows icon and cursor files")
+ (description "Icoutils are a set of program for extracting and converting
+bitmaps from Microsoft Windows icon and cursor files. These files usually
+have the extension @code{.ico} or @code{.cur}, but they can also be embedded
+in executables and libraries (@code{.dll}-files). (Such embedded files are
+referred to as resources.)
+
+Conversion of these files to and from PNG images is done @command{icotool}.
+@command{extresso} automates these tasks with the help of special resource
+scripts. Resources such can be extracted from MS Windows executable and
+library files with @command{wrestool}.
+
+This package can be used to create @code{favicon.ico} files for web sites.")
+ (license license:gpl3+)))
+
+(define-public libavif
+ (package
+ (name "libavif")
+ (version "0.7.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AOMediaCodec/libavif")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17hagdngpc4xzrr0aa48nx399y5lawyyx9cpcdhpds1mqk6p77lp"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON"
+ "-DAVIF_CODEC_RAV1E=OFF" ; not packaged yet
+ "-DAVIF_BUILD_TESTS=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "./aviftest" "../source/tests/data")))
+ (add-after 'install 'install-readme
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (string-append out "/share/doc/libavif-" ,version)))
+ (install-file "../source/README.md" doc)
+ #t))))))
+ (inputs
+ `(("libaom" ,libaom)
+ ("dav1d" ,dav1d)))
+ (synopsis "Encode and decode AVIF files")
+ (description "Libavif is a C implementation of @acronym{AVIF, the AV1 Image
+File Format}. It can encode and decode all YUV formats and bit depths supported
+by AOM, including with alpha.")
+ (home-page "https://github.com/AOMediaCodec/libavif")
+ (license (list license:bsd-2 ; libavif itself
+ license:expat)))) ; cJSON in the test suite
+
+(define-public mtpaint
+ (package
+ (name "mtpaint")
+ ;; The author neither releases tarballs nor uses git version tags.
+ ;; Instead, author puts version in git commit title.
+ (version "3.49.27")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wjaguar/mtPaint")
+ (commit "26751cd0336414e2f16cbe25c9fe2702f34e7b5c")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "12mzai9pqvyb342m21rjz0jxiy75q24sjw6ax147pzy8frzkgd54"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("pkg-config" ,pkg-config)
+ ("which" ,which)))
+ (inputs
+ `(("imlib2" ,imlib2)
+ ("libtiff" ,libtiff)
+ ("libpng" ,libpng)
+ ("libungif", libungif)
+ ("libjpeg", libjpeg-turbo)
+ ("libwebp" ,libwebp)
+ ("openjpeg" ,openjpeg)
+ ("lcms" ,lcms)
+ ("zlib", zlib)
+ ("glib" ,glib)
+ ;; Support for gtk3 is in the testing stage.
+ ("gtk+" ,gtk+-2)))
+ (arguments
+ `(#:configure-flags
+ (list "intl" ; build internationalized version
+ "man") ; build the man page
+ #:tests? #f)) ; no test suite
+ (home-page "http://mtpaint.sourceforge.net/")
+ (synopsis "Create pixel art and manipulate digital images")
+ (description
+ "Mtpaint is a graphic editing program which uses the GTK+ toolkit.
+It can create and edit indexed palette or 24bit RGB images, offers basic
+painting and palette manipulation tools. It also handles JPEG, JPEG2000,
+GIF, TIFF, WEBP, BMP, PNG, XPM formats.")
+ (license license:gpl3+)))
+
+(define-public phockup
+ (package
+ (name "phockup")
+ (version "1.5.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ivandokov/phockup")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "13ajj0xch7yfqaaxbw0awxs0fz17n1rxir4gqh2wcgxjysqk1j2y"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("src" "share/phockup/")
+ ("phockup.py" "share/phockup/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (list "src/dependency.py" "src/exif.py")
+ (("exiftool")
+ (string-append (assoc-ref inputs "perl-image-exiftool")
+ "/bin/exiftool")))
+ #t))
+ (add-before 'install 'check
+ (lambda _
+ (invoke "pytest")))
+ (add-after 'install 'install-bin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir (string-append out "/bin"))
+ (symlink (string-append out "/share/phockup/phockup.py")
+ (string-append out "/bin/phockup")))
+ #t)))))
+ (inputs
+ `(("perl-image-exiftool" ,perl-image-exiftool)
+ ("python" ,python)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (home-page "https://github.com/ivandokov/phockup")
+ (synopsis "Organize photos and videos in folders")
+ (description "Phockup is a media sorting tool that uses creation date and
+time information in photos and videos to organize them into folders by year,
+month and day. All files which are not images or videos or those which do not
+have creation date information will be placed in a folder called
+@file{unknown}.")
+ (license license:expat)))