Adjust White balance?
I'm looking at some image processing algorithms for white balance manipulations. Seems like a previous Stackoverflow [question](https://stackoverflow.com/questions/1175393/white-balance-algorithm) answers the question of automatic white balance algorithms rather well. However I'm wondering how to convert from one temperature to another, i.e. Making the assumption (and its a big assumption) that a white balance algorithm could take a processed image (e.g. JPEG etc) and place the overall temperature in a scene at 6500, how would you algorithmically "cool" or "warm" the scene to a specific temperature? This would be a common operation in an image editing program, albeit these typically operate on RAW images which have no processing applied (colour space manipulation or otherwise)- In the case of RAW files - perhaps the individual RAW files contain sufficient information (in the file header) regarding the colour calibration of the camera sensor to make the specific temperature transformation more deterministic? Any input appreciated - thanks!