Using Python PIL, I'm trying to adjust the hue of a given image.
I'm not very comfortable with the jargon of graphics, so what I mean by “adjusting hue” is doing the Photoshop operation called “Hue/saturation”: this is to change the color of the image uniformly as shown below:
Original:
With hue adjusted to +180 (red):
With hue adjusted to -78 (green):
FYI, Photoshop uses a scale of -180 to +180 for this hue setting (where -180 equals +180), that may represents the HSL hue scale (expressed in 0-360 degree).
What I'm looking for is a function that, given an PIL image and a float hue within [0, 1] (or int within [0, 360], it doesn't matter), returns the image with its hue shifted by hue as in the example above.
What I've done so far is ridiculous and obviously doesn't give the desired