I've found a couple of ways to use ImageMagick's "convert" utility to salvage underexposed digital photos. Both methods preferentially boost the brightness of darker pixels, so that dark areas are boosted, without blowing out brighter areas. My problem is that the latest stable builds (6.2.2.5 and 6.2.4.2-r1) don't work, so I've had to mask them out in /etc/portage/package.mask with the line
>media-gfx/imagemagick-6.2.2.3-r1 The two particular uses are... 1) a script called "pwrr" that uses a power curve, like so #!/bin/bash convert -depth 8 ${1} -fx u^${3} ${2} example pwrr input_file.tif output_file.tif 0.5 The lower the 3rd parameter, the more that dark areas get brightened. Should be below 1 and greater than 0. Approx 20 seconds to process a 2048x1536 TIFF on an AMD3000+ K8 (32-bit mode) with 2 gigs of RAM. 2) a script called "logg" that uses a logarithmic curve like so #!/bin/bash convert -depth 8 ${1} -fx "ln(u*(${3}-1)+1)/ln(${3})" ${2} example logg input_file.tif output_file.tif 16 The higher the 3rd parameter, the more that dark areas get brightened. The 3rd parameter *MUST* be greater than 1. Approx 60 seconds to process a 2048x1536 TIFF on an AMD3000+ K8 (32-bit mode) with 2 gigs of RAM. The latest unstable builds complain about not finding libMagick.so.6. If I create the appropriate symlink, "convert" runs, and returns *INSTANTLY*, instead of taking time to process the file. The output file is a straight copy of the input file (minus metadata) with no processing at all. Other new builds do make the lib, but don't work. They also create an unprocessed copy, and return instantly. The following ebuilds are available imagemagick-6.1.8.8.ebuild imagemagick-6.2.0.4.ebuild imagemagick-6.2.0.6.ebuild imagemagick-6.2.1.5.ebuild imagemagick-6.2.1.5-r1.ebuild imagemagick-6.2.2.0.ebuild imagemagick-6.2.2.0-r1.ebuild imagemagick-6.2.2.3.ebuild imagemagick-6.2.2.3-r1.ebuild imagemagick-6.2.4.2.ebuild imagemagick-6.2.4.2-r1.ebuild imagemagick-6.2.5.2.ebuild imagemagick-6.2.5.4.ebuild imagemagick-6.2.5.5.ebuild imagemagick-6.2.6.0.ebuild I set /etc/portage/package.keywords to accept ~x86 builds like so... media-gfx/imagemagick ~x86 I built 6.2.6.0. I tested it, and it failed. Tried 6.2.5.5, same results. Rinse, lather, repeat, with the immediately earlier version each time. It wasn't until I got down to 6.2.2.3-r1 that it worked. Other relevant data... AMD 3000+ K8 running in 32-bit mode [m3000][root][~] emerge --pretend --verbose imagemagick These are the packages that I would merge, in order: Calculating dependencies ...done! [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 CFLAGS="-O2 -pipe -fomit-frame-pointer -march=athlon -m3dnow -mmmx -msse -msse2 -mfpmath=sse" CHOST="i686-pc-linux-gnu" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j1" 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" -- Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1 My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list