I need to generate thumbnail and medium sized images from large photos. These smaller photos are for display in an online gallery. Many of the photographers are submitting
On the server side you could call out to ImageMagick and let it do the conversion for you.
Here's a link to the -colorspace command line option
I haven't used this particular option, but it seems to do what you want.