Download: latest (1.8.0)

pymagery — python imagery


1.8.0 documentation / huerotate plugin

The huerotate plugin adjusts the hue by a specifies number of degrees. Any degree value can be supplied and the resulting value will be normalized back to [0,360)

The plugin prototype is:

def huerotate(width, deg)

The following are examples of hues being rotated. A rotation of 0 degrees leaves the image unchanged.

Degrees Result Image
0
60
120
180
240
300
360

The code to generate the above images could be:

from pymagery import image i = image('ISU_mute_swans.ppm') i.COPY().HUEROTATE(60).save('ISU_mute_swans-huerotate-60.ppm') i.COPY().HUEROTATE(120).save('ISU_mute_swans-huerotate-120.ppm') i.COPY().HUEROTATE(180).save('ISU_mute_swans-huerotate-180.ppm') i.COPY().HUEROTATE(240).save('ISU_mute_swans-huerotate-240.ppm') i.COPY().HUEROTATE(300).save('ISU_mute_swans-huerotate-300.ppm') i.COPY().HUEROTATE(360).save('ISU_mute_swans-huerotate-360.ppm')

Change Log