OS X: Color Temperature

Does anyone have code or a pointer to code that would allow me to read in an image and
then change the color temperature of the image? (as in iPhoto, etc.)

Thanks, Mike