Unexpected colour shift

I noticed a very significant colour shift in a few of my photos after I uploaded photos to my drupal photo gallery.   Since I have upgraded many of the image related modules over the last few months and also switched to Adobe Lightroom 3, it wasn't initially apparent what was causing the colour shift.

 

The photo on the left is the correct colour, the photo on the right has a dramatic colour shift.

In the process of troubleshooting this issue, I looked at the full sized file that was uploaded to the server.  The full sized file didn't have the color shift.  This pointed to Imagecache being at the root of the problem.  But if Imagecache was causing the problem, it should happen in all photos.  So the problem then has to be an issue between the image file and Imagecache.

After much analysys I was able to re-create the problem.  I found that the images that were experiencing the colour shift issue had the color space set to ProphotoRGB, and the images that didn't experience the colour shift issue had the colour space set to sRGB.

To ensure that I was consistant in what colour space Lightroom used when converting from a Raw file format to a JPG file format, a created an export preset.