Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140341 - graphicsmagick ebuild defaults to hard-coded quantum depth 16
Summary: graphicsmagick ebuild defaults to hard-coded quantum depth 16
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Bryan Østergaard (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-14 04:07 UTC by Florian Berger
Modified: 2006-08-18 04:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Berger 2006-07-14 04:07:02 UTC
Overview Description:
The GraphicsMagick image manipulation package has a compile time switch to set the default color depth for all operations (./configure --with-quantum-depth=8/16/32). This allows for professional image manipulation, but can also introduce a considerable performance slowdown and unexpected behaviour.

The original software defaults to a common value of 8 (Bits/color channel). The graphicsmagick-1.1.7.ebuild however sets a hard-coded "--with-quantum-depth=16" in src_compile().

Quote from the install instructions:
"The default is 8. This option is the most important option in determining the overall run-time performance of GraphicsMagick. [...] Larger pixel quantums cause GraphicsMagick to run more slowly and to require more memory. For example, using sixteen-bit pixel quantums causes GraphicsMagick to run 15% to 50% slower (and take twice as much memory) than when it is built to support eight-bit pixel  quantums."
(http://www.graphicsmagick.org/www/INSTALL-unix.html)

Steps to Reproduce:
root@host$ emerge graphcismagick
root@host$ gm import test.png
root@host$ gm identify test.png

Actual Results:
test.png PNG 326x107+487+660 DirectClass 16-bit 8.2k 0.020u 0:01

(observe the 16-bit)

Expected Results:
This is just an example. Most users would expect an 8 Bit per channel image when taking a screenshot of a 24 Bit screen. Performance would be better, image files would be smaller.

Workaround:
One could always use -depth 8 with GraphicsMagick, but this is kind of annoying.

Suggested fix:
There should be a USE flag for emerge or some switch in make.conf (like GMQUANTUM=8/16/32). The default in the ebuild should be 8.

Bug affects:
graphicsmagick-1.1.5.ebuild
graphicsmagick-1.1.5-r1.ebuild
graphicsmagick-1.1.6.ebuild
graphicsmagick-1.1.6-r1.ebuild
graphicsmagick-1.1.7.ebuild

emerge --info:
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.3.2, glibc-2.3.5-r2, 2.6.17-rc3 i686)
=================================================================
System uname: 2.6.17-rc3 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.14
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.3, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.4
sys-devel/binutils:  2.14.90.0.7-r4
sys-devel/gcc-config: 1.3.12-r6
sys-devel/libtool:   1.4.3-r4, 1.5.22
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/X11/xkb /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm avi berkdb bitmap-fonts cli crypt dlloader dri eds emboss encode esd flac foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jack jpeg libg++ libwww mad mmx motif mp3 mpeg ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection sasl sdl session spell spl ssl tcltk tcpd threads truetype truetype-fonts type1-fonts udev vorbis win32codecs xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_de userland_GNU video_cards_mach64"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Thanks,

Florian Berger, Leipzig, Germany
Comment 1 Bryan Østergaard (RETIRED) gentoo-dev 2006-08-16 14:19:55 UTC
Added "depth16" and "depth32" USE flags in 1.1.7-r2 and defaulted to 8-bit. Thanks for your request.
Comment 2 Florian Berger 2006-08-18 04:29:16 UTC
Hi,
I just tested it:

$ emerge graphicsmagick
>>> media-gfx/graphicsmagick-1.1.7-r2 merged.
$ gm import test.png
$ gm identify test.png
test.png PNG 1024x768+0+0 DirectClass 8-bit 49.1k 0.140u 0:01

Perfect. Thanks a lot!

Florian Berger, Leipzig, Germany