ufraw has a very nice feature that allows one to pick a spot in a photograph (RAW format) that is gray or white and it will set the white balance for the photograph appopriately. This works really well.

The problem is that I have an underwater camera that only takes JPEG so I can't use ufraw to correct the colors (which are often horribly blue). However, there is usually some white sand in the photos so a feature like this would likely work great if it was available.

The closest I've been able to find with a linux program is a plugin for the Gimp which lets you pick a spot and specify which shade of gray it should be. But ufraw does this automatically.

Does anyone have a better solution or suggestion of where to look?