add support for agg_pixfmt_gray32(_pre) and port changes to agg_color_gray/rgba and gamma calc from https://github.com/pelson/antigrain