Converseen, a GUI batch image converter and resizer using Qt4 and ImageMagick

I normally use ImageMagick on the command line to convert and/or resize my photographs, and the two commands I use are convert and mogrify. However, I learned recently of Converseen, a GUI tool for batch conversion and resizing of image files which is a front-end for ImageMagick. Although it’s easy enough to use the command line, a GUI tool does save having to remember the command syntax each time, so I thought I’d install Converseen in Gentoo. Converseen is not in the main Portage tree, but I found an ebuild for version 0.2 from the qting-edge overlay. However, rather than add the overlay I decided instead to use a local overlay to install Converseen, which is currently at version 0.4.1, and the procedure I used is given below.

1. I downloaded to ~/Desktop/ the ebuild file from and renamed it as converseen-0.4.1.ebuild, which contains the following:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $



inherit qt4-edge


DESCRIPTION="GUI image conversion tool based on imagemagick"

KEYWORDS="~amd64 ~x86"

        || ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick )"


#PATCHES=( "${FILESDIR}/${P}-cflags.patch" )

src_prepare() {

        sed -i -e "s!/usr/lib!/usr/$(get_libdir)!" ${PN}.pro \
                || die "sed libdir failed"

        local ts_files=
        for lingua in ${LINGUAS}; do
                for a in ${LANGSLONG}; do
                        if [[ ${lingua} == ${a%_*} ]]; then
                                ts_files="${ts_files} loc/${PN}_${a}.ts"
        local qm_files="${ts_files/.ts/.qm}"

        sed -e '/^ loc/d' \
                -e "s!\(TRANSLATIONS += \).*!\1${ts_files}!" \
                -e "s!\(translations\.files = \).*!\1${qm_files}!" \
                -i ${PN}.pro || die "sed translations failed"

2. I downloaded to ~/Desktop/ the file qt4-edge.eclass, which contains the following:

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# @ECLASS: qt4-edge.eclass
# Ben de Groot <>,
# Markos Chandras <>,
# Davide Pesavento <>,
# Dominik Kapusta <>
# @BLURB: Experimental eclass for Qt4 packages
# This eclass contains various functions that may be useful when
# dealing with packages using Qt4 libraries. Requires EAPI=2.

inherit base eutils multilib qt4-r2 toolchain-funcs

export XDG_CONFIG_HOME="${T}"

qt4-edge_pkg_setup() {
        if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
                ewarn "Please file bugs on and prepend the summary with"
                ewarn "[qting-edge]. Alternatively, contact"
                ewarn "Thank you for using qting-edge overlay."
                ebeep 5

qt4-edge_src_unpack() {
        debug-print-function $FUNCNAME "$@"

        qt4-r2_src_unpack "$@"

# @FUNCTION: qt4-edge_src_prepare
# Default src_prepare function for packages that depend on qt4. If you have to
# override src_prepare in your ebuild, you should call qt4-edge_src_prepare in it,
# otherwise autopatcher will not work!
qt4-edge_src_prepare() {
        debug-print-function $FUNCNAME "$@"


# @FUNCTION: qt4-edge_src_configure
# Default src_configure function for packages that depends on qt4. If you have to
# override src_configure in your ebuild, call qt4-edge_src_configure in it.
qt4-edge_src_configure() {
        debug-print-function $FUNCNAME "$@"


# @FUNCTION: qt4-edge_src_compile
# Default src_compile function for packages that depends on qt4. If you have to
# override src_compile in your ebuild (probably you don't need to), call
# qt4-edge_src_compile in it.
qt4-edge_src_compile() {
        debug-print-function $FUNCNAME "$@"


# @FUNCTION: qt4-edge_src_install
# Default src_install function for qt4-based packages. Installs compiled code,
# documentation (via DOCS variable) and translations (via LANGS and
# LANGSLONG variables).
qt4-edge_src_install() {
        debug-print-function $FUNCNAME "$@"


        # install translations # hwoarang: Is this valid for every package???
        # need to have specified LANGS or LANGSLONG for this to work
        [[ -n "${LANGS}" || -n "${LANGSLONG}" ]] && prepare_translations

# Internal function
_do_qm() {
        debug-print-function $FUNCNAME "$@"
        [[ $# -ne 2 ]] && die "$FUNCNAME requires exactly 2 arguments!"

        local transfile="$(find "${1}" -type f -name "*${2}".qm)"
        if [[ -e ${transfile} ]]; then
                INSDESTTREE="/usr/share/${PN}/${1#${S}}" \
                        doins "${transfile}" \
                        || die "failed to install ${2} translation"
                eerror "Failed to install ${2} translation. Contact eclass maintainer."
                die "Failed to install translations"

# @DESCRIPTION: Translations directory. If not set, ${S} will be used

# @FUNCTION: prepare_translations
# Choose and install translation files. Normally you don't need to call
# this function directly as it is called from qt4-edge_src_install.
prepare_translations() {
        debug-print-function $FUNCNAME "$@"

        # Find translations directory
        # Changed default to . - crazy upstreams
        local roottrdir="${TRANSLATIONSDIR:-${S}}" trdir=.
        for dir in lang langs translations; do
                [[ -d ${roottrdir}/${dir} ]] && trdir="${roottrdir}/${dir}"

        local lang=
        for lang in ${LINGUAS}; do
                for x in ${LANGS}; do
                        [[ ${lang} == ${x%_*} ]] && _do_qm "${trdir}" ${x}
                for x in ${LANGSLONG}; do
                        [[ ${lang} == ${x} ]] && _do_qm "${trdir}" ${x}

EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install

3. I synchronised the Portage main tree’s ebuilds on my PC with those in the repositories:

# emerge --sync

4. I made sure that /etc/make.conf has the following lines at the end of the file:

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

5. I created the necessary directories in the local overlay:

# mkdir -p /usr/local/portage/media-gfx/converseen
# mkdir -p /usr/local/portage/eclass

6. I made sure Portage would not nag me about a missing name for my local overlay:

# mkdir /usr/local/portage/profiles
# echo "local_overlay" > /usr/local/portage/profiles/repo_name

7. I copied the converseen ebuild and eclass file into the relevant directories:

# cp /home/fitzcarraldo/Desktop/converseen-0.4.1.ebuild /usr/local/portage/media-gfx/converseen/
# cp /home/fitzcarraldo/Desktop/qt4-edge.eclass /usr/local/portage/eclass/

8. I generated the manifest for the package:

# cd /usr/local/portage/media-gfx/converseen/
# ebuild converseen-0.4.1.ebuild manifest

9. I merged the package:

# emerge -1v converseen

An entry for Converseen was added to Kickoff > Applications > Graphics, and I can either use that to launch it or I can launch it from the command line by entering the command converseen. The user interface is easy to master, and I’ve already put Converseen to use at work and at home. Overall, then, a useful addition to my KDE toolkit.

EDIT (July 23, 2012}: There is an ebuild for Converseen in Portage these days, so use that instead to install Converseen.

About Fitzcarraldo
A Linux user with an interest in all things technical.

2 Responses to Converseen, a GUI batch image converter and resizer using Qt4 and ImageMagick

  1. Andrew Weber says:

    Excellent in-depth write up. It’s much simpler to use Converseen on Ubuntu as I have done. I am loving it’s features though, great for beginners who may have trouble using ImageMagick from the CLI. Thanks again.

  2. Pingback: A guided tour of my KDE 4.8.4 desktop (Part 2) « Fitzcarraldo's Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: