For a couple of years I've had occasional problems with "convert",
which other people couldn't replicate. I think I've found the root
cause, and a workaround to the problem. My Panasonic FZ5 camera can
take photos in either jpeg or tiff format. I use tiff, so that I can
touch up images without incurring additional detail losses each step of
the way. I do quite a bit of stuff with convert. One fancy script is
"loggv", which applies a logarithmic brightness boost to individual
pixels and then displays the result. Here it is...
#!/bin/bash
convert -depth 8 ${1} -fx "ln(u*(${3}-1)+1)/ln(${3})" ${2}
display ${2}
It is usually invoked like so...
loggv sample.tif output.tif 4
The parameters are input file, output file, and logarithmic boost
factor, respectively. If I run it against a tiff file from my camera,
it returns immediately, without making any changes whatsoever. However,
if the file from my camera is run through a dummy convert step first,
the script functions properly. It takes 8 seconds to process a 640x480
tiff on my AMD 3000+ with 2 gigs of ram. Note that I'm running Gentoo
linux, so I have cpu-specific optimizations galore. An average linux
distro may take longer on the same hardware. I've modified my script to
automatically do the dummy convert pass, like so...
#!/bin/bash
convert -depth 8 ${1} x1.tif
convert -depth 8 x1.tif -fx "ln(u*(${3}-1)+1)/ln(${3})" ${2}
display ${2}
and things work OK now. Here's what I believe is happening...
- my camera makes non-standard tiff files.
- convert chokes when doing fancy stuff on my camera's files.
- convert can, however, do a straight conversion to tiff. When it
does so, it generates a tiff file that it considers standard.
- convert can then do fancy stuff on the standard tiff file that it
has just generated.
If any imagemagick developers are interested, I can email a sample
photo from my camera. A 640x480 tiff is just under a megabyte. bzip2
can compress it losslessly to 555 kbytes, so emailing it isn't painful.
--
Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users