Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: Gentoo Users List <gentoo-user@l.g.o>
Subject: [gentoo-user] ImageMagick convert utility; latest version has problems
Date: Fri, 10 Feb 2006 07:29:47
Message-Id: 20060210072509.GA1284@waltdnes.org
1 I've found a couple of ways to use ImageMagick's "convert" utility
2 to salvage underexposed digital photos. Both methods preferentially
3 boost the brightness of darker pixels, so that dark areas are boosted,
4 without blowing out brighter areas. My problem is that the latest
5 stable builds (6.2.2.5 and 6.2.4.2-r1) don't work, so I've had to mask
6 them out in /etc/portage/package.mask with the line
7
8 >media-gfx/imagemagick-6.2.2.3-r1
9
10 The two particular uses are...
11
12 1) a script called "pwrr" that uses a power curve, like so
13 #!/bin/bash
14 convert -depth 8 ${1} -fx u^${3} ${2}
15
16 example
17 pwrr input_file.tif output_file.tif 0.5
18
19 The lower the 3rd parameter, the more that dark areas get brightened.
20 Should be below 1 and greater than 0. Approx 20 seconds to process a
21 2048x1536 TIFF on an AMD3000+ K8 (32-bit mode) with 2 gigs of RAM.
22
23
24 2) a script called "logg" that uses a logarithmic curve like so
25 #!/bin/bash
26 convert -depth 8 ${1} -fx "ln(u*(${3}-1)+1)/ln(${3})" ${2}
27
28 example
29 logg input_file.tif output_file.tif 16
30
31 The higher the 3rd parameter, the more that dark areas get brightened.
32 The 3rd parameter *MUST* be greater than 1. Approx 60 seconds to
33 process a 2048x1536 TIFF on an AMD3000+ K8 (32-bit mode) with 2 gigs of
34 RAM.
35
36
37 The latest unstable builds complain about not finding libMagick.so.6.
38 If I create the appropriate symlink, "convert" runs, and returns
39 *INSTANTLY*, instead of taking time to process the file. The output
40 file is a straight copy of the input file (minus metadata) with no
41 processing at all. Other new builds do make the lib, but don't work.
42 They also create an unprocessed copy, and return instantly.
43
44 The following ebuilds are available
45
46 imagemagick-6.1.8.8.ebuild
47 imagemagick-6.2.0.4.ebuild
48 imagemagick-6.2.0.6.ebuild
49 imagemagick-6.2.1.5.ebuild
50 imagemagick-6.2.1.5-r1.ebuild
51 imagemagick-6.2.2.0.ebuild
52 imagemagick-6.2.2.0-r1.ebuild
53 imagemagick-6.2.2.3.ebuild
54 imagemagick-6.2.2.3-r1.ebuild
55 imagemagick-6.2.4.2.ebuild
56 imagemagick-6.2.4.2-r1.ebuild
57 imagemagick-6.2.5.2.ebuild
58 imagemagick-6.2.5.4.ebuild
59 imagemagick-6.2.5.5.ebuild
60 imagemagick-6.2.6.0.ebuild
61
62 I set /etc/portage/package.keywords to accept ~x86 builds like so...
63 media-gfx/imagemagick ~x86
64
65 I built 6.2.6.0. I tested it, and it failed. Tried 6.2.5.5, same
66 results. Rinse, lather, repeat, with the immediately earlier version
67 each time. It wasn't until I got down to 6.2.2.3-r1 that it worked.
68 Other relevant data...
69
70 AMD 3000+ K8 running in 32-bit mode
71
72 [m3000][root][~] emerge --pretend --verbose imagemagick
73
74 These are the packages that I would merge, in order:
75
76 Calculating dependencies ...done!
77 [ebuild R ] media-gfx/imagemagick-6.2.2.3-r1 +X -cups +doc -fpx -graphviz -jbig +jpeg -lcms +mpeg -perl +png +tiff +truetype +wmf -xml2
78
79
80 CFLAGS="-O2 -pipe -fomit-frame-pointer -march=athlon -m3dnow -mmmx -msse -msse2 -mfpmath=sse"
81 CHOST="i686-pc-linux-gnu"
82 CXXFLAGS="${CFLAGS}"
83 MAKEOPTS="-j1"
84 USE="-* 3dnow X a52 aac alsa bzip2 cdr dga dio divx4linux dri dvd dvdr dvdread encode exif ffmpeg flac fortran gb gif gtk2 imlib jpeg maildir mikmod mime mmap mmx mng mp3 mpeg ncurses nptl nptlonly nsplugin offensive ogg opengl plotutils png posix quicktime readline sdl sharedmem slang sockets sse theora threads tiff truetype vcd vorbis win32codecs wmf xpm xv zlib"
85
86 --
87 Walter Dnes <waltdnes@××××××××.org> In linux /sbin/init is Job #1
88 My musings on technology and security at http://tech_sec.blog.ca
89 --
90 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] ImageMagick convert utility; latest version has problems "Frédéric Grosshans" <frederic.grosshans.1995@×××××××××××××.org>