By the way, here is a useful trick: blurred layer in Divide mode, plus vary the opacity. You can reduce the amount of contrast between light and dark areas in an image without completely leveling it. Works well with low opacity levels (just a slight blend of the Divide mode layer). If you have a picture with areas that are too dark and too bright, a touch of this can help. High radii tend to work well, with blends of up to 20% or so.
For me, this does what I want Retinex to do! Only better, with intuitive control parameters and predictable results.
Look at the picture of the little girl peering out of the back window of a truck on NASA's Retinex page, as enhanced by Retinex:
http://dragon.larc.nasa.gov/retinex/pao/news/
Now my version:
http://www.kylheku.com/~kaz/nasa-image-girl-truck.png
The reflection in the glass is brought out in a less cheesy way that you might not guess is the result of processing, if you don't already know.
I did a decompose of the image to the LAB color space (Colors/Components/Decompose...). Then I used a blur radius of 200 pixels on a copy of the L layer. Put into Divide mode and blended at a bit over 30%, and recomposed from LAB back to the original RGB image.
(That's a simplification; of course I had to struggle with Gimp to preserve the ID of the L layer, which is destroyed by a straight "merge layer down" after which the recompose operation fails with an error. I in fact made two copies of the L layer, and did the processing and merge operation between those two copies. Then I did a select all to copy the resulting layer to the clipboard and pasted that into the original L layer to replace it.)