def shift_hue(image, hue):
hue = (hue - <NUM_LIT:1.0>) * <NUM_LIT><EOL>img = image.copy().convert("<STR_LIT>")<EOL>pixels = img.load()<EOL>for i in range(img.width):<EOL><INDENT>for j in range(img.height):<EOL><INDENT>h, s, v = pixels[i, j]<EOL>h = abs(int(h + hue))<EOL>if h > <NUM_LIT:255>:<EOL><INDENT>h -= <NUM_LIT:255><EOL><DEDENT>pixels[i, j] = (h, s, v)<EOL><DEDENT><DEDENT>return img.convert("<STR_LIT>")<EOL>
Shifts the hue of an image in HSV format.
:param image: PIL Image to perform operation on
:param hue: value between 0 and 2.0