Fix loss of alpha when adjusting brightness/hue/saturation for raster. Clean and optimize code
Merge pull request #499 from nyalldawson/fix_alpha

Fixes loss of alpha after adjusting brightness/contrast/hue/saturation for rasters