Page MenuHomePhabricator

Document how to convert images from UNESCO
Closed, ResolvedPublic

Description

The images are in .jp2 (JPEG-2000) which is not a free format and thus need to be converted before they can be uploaded to Commons.

They can be converted to tiff e.g. with http://www.graphicsmagick.org/batch.html

Event Timeline

Alicia_Fagerving_WMSE renamed this task from Convert images from UNESCO to Document how to convert images from UNESCO.Aug 22 2019, 12:30 PM

This was harder than expected, because graphicsmagick, despite being installed this way, kept complaining about No decode delegate for this image format.

Ended up using ffmpeg (version 3.4.6) instead which was already installed on my Ubuntu 18.04, though I don't know if it was there by default.

A whole directory of files can be converted with a bash script:

#!/bin/bash
for file in *.jp2; do
  outfile=`basename $file .jp2`.tiff
  ffmpeg -i "$file" "$outfile"
done

Note that the resulting files are at least 3 times heavier than originally, so make sure there's enough space on the hard drive before converting a big batch.